We're fortunate to have Mike Keith presenting at the next meeting, which will be Wednesday 17th October. Beer and Nibbles 6:00, session starts at 6:30 sharp....
We're fortunate to have Mike Keith presenting at the next meeting, which will be Wednesday 17th October. Drinks and nibbles 5:30, session starts at 6:00 sharp....
public class HashTest { public static void main(String[] args) { HashMap<Object, String> map = new HashMap<Object, String>(); System.err.println("SIZE: " +...
My sentiments exactly! 8^) The unexpected behaviour also occurs in 1.5_12 and 1.6_02. _____ From: Jon Seymour [mailto:jon.seymour@...] Sent: Friday, 12...
I'm not sure which part is unexpected. The Javadoc for HashMap states... This implementation provides all of the optional map operations, and permits null...
HashMap has always been that way, and for me it is exactly as I would have expected. From the first paragraph of the documentation for HashMap: This...
Benjamin Johnston
superhero@...
Oct 12, 2007 9:52 am
7003
please give me a link of good tutorial or pdf or ppt on DAO for java...
HashMap allows null keys and values. From javadoc: ** * Hash table based implementation of the <tt>Map</tt> interface. This * implementation provides all of...
Thanks to everyone who responded by simply pointing out what the javadoc says. However, I think the point of the question might have been missed. How is it...
I fail to see your point. It is perfectly reasonable for three reasons: 1. The documentation for HashMap explicitly mentions that that is what the class does ...
We're fortunate to have Mike Keith presenting at tonight's meeting. Drinks and nibbles 5:30, session starts at 6:00 sharp. We're at the Wesley Centre, 220 Pitt...
... If that is your main problem with null you are well off ;-) Null is an ugly beast, although having a hash code is not a problem: there is only one null so...
Peter – what would be “doing things right”. Most of the evil that I see coming from the concept of null seem to me to be unavoidable. The alternative...
Hi All, In light of the recent discussion about nulls in hash maps, I would like to know what the group feels are good (or bad) uses for nulls. Return types....
In addition to resolving ambiguous overloaded method calls, named parameters can be very useful for ensuring that parameters are assigned correctly for methods...
Daniel, Scala (http://www.scala-lang.org/ , another programming language compiling to the JVM) already improves things by defaulting to not allowing null...
Hi Robert (and ajug) I use nulls in code to determine if a programmer knows how to write Java code, or if they are a frustrated C programmer using a Java...
What annoys me most is when a programming language has a feature then people decide it's evil and refuse to use it. The Null Object pattern is fine in some...
Hi Jon, I am not sure I entirely appreciate what the NullObject pattern can do. It seems that you still need the same branch in logic to deal with null return ...
Hi Peter, Yep, what you have described for Scala is pretty much what I was thinking of. As far as null being an instance of the absurd type, I'm not sure if I...
You're misunderstanding the NullObject pattern. That, and the Result object I described perform 2 different operations. In the case of the NullObject pattern,...
Hi John, I kind of agree with you, if you've been given a hammer don't use it to bang in screws. But that doesn't mean you can't bitch about not being given a...
... Of course, and bitching is so much fun it's inevitable :-). Remember that this hammer was designed 15(?) years ago when all we had was a hard rock with a...
Yep John, you're absolutely right, I shouldn't slag off at the designers/creators, at the end of the day when McGyver makes a machine gun out of an air...
Daniel, yes, I think you understand Scala right -- at least it matches my understanding which is based on reading up on Scala a bit. Your understanding of what...
... What's convenient to the person coding is not always what is convenient a year later when you need to fix that code quickly. ... I agree that enforcing...
To add something to this (no disagreement at all): I think the point that might be missing here is that there are two scenarios: a) something can not be...
... NullObject is appropriate sometimes. For example, if you have a function like this: void func(MyObject arg) { int i = 0; if (arg == null) { i = i + 1; }...
OK, so a NullObject would be extremely useful if you can provide a legitimate default implementation - that's cool. I will definitely keep this in mind. ... ...