Originally posted by John Todd:
Yes but Timestamp class contains the nano second part which java.util.Date doesn't handle it.
When I'm trying to display the converted Date object (according to my previous posted code), I got:
date info .. 00:00:00 ...
Obviously, I lost the time.
Originally posted by rahul dravid:
If I use select statement than what happens?
Originally posted by Campbell Ritchie:
That's a good idea, Joanne.
And Imama, I have told you, you might not agree with the decision to use the Object implementation. I don't myself, but I think we are stuck with it. I have looked on the lists of requests and bugs at Sun, and this has come up before and they are sticking by their decision. So we are stuck with it!
Originally posted by Campbell Ritchie:
But equals() IS implemented in StringBuilder; it isnot overridden. We have already told you why it isn't overridden, and I have told you a workaround. Because StringBuilder is expected to change rapidly. You might not agree with that, but that it the reason.
Originally posted by Paul Sturrock:
No, it won't. The Map will work as expected. It will match based on the equals() method defines in the Object class. If you were expecting it to work based on the value this would be a misreading of the JavaDocs on your part.
Originally posted by Campbell Ritchie:
The explanation is that StringBuilder and StringBuffer are expected to change their values repeatedly, so equality based on content would change.
You can always say
if (builder.toString().equals(otherBuilder.toString())) . . .
Originally posted by Joanne Neal:
You can find the source code for the Java API classes in a file called src.zip in your JDK installation directory. Have a look at the code for the String class and you will get the answer.