Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
long is a primative type, not an Object, so you should instead do the comparison, for example:
However, instead of all the gyrations you are doing, you could simply cast to directly to a Long object and use its compareTo() method: Another thing, if you do want to get a long from a Long object (or an int from an Integer object, etc.), you don't need to do the toString() with parseLong(), you can (and should) use the - mfg
Replies:
|
Sponsored Links
|