aspose file tools
The moose likes Beginning Java and the fly likes difference between true type Long and primitive type long? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "difference between true type Long and primitive type long?" Watch "difference between true type Long and primitive type long?" New topic
Author

difference between true type Long and primitive type long?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 758
what is the difference between true type Long and primitive type long? what siutation I should use which ?

Thanks
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
One is a primitive, and one is not. As you know, you can only put Objects in collections and so forth. In that case, you would need the non-primitive long. Other places I'm not sure there's any precedent for using one over the other. Situations do vary, however. Use your best judgement based on your understanding of the difference.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: difference between true type Long and primitive type long?
 
Similar Threads
objects
Using 'volatile'
Wrapper class
toUpper, toLower for chars
Integer.parseInt() vs String concatenation