David, the long is a primitive 64 bit two's compliment integer datatype (see
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html for
more information on primitive datatypes). The Long class is a "wrapper"
class that provides built in methods for the long datatype just as the
Integer class is a "wrapper" class for the integer datatype (see
http://java.sun.com/docs/books/tutorial/java/data/numberclasses.html for
more information on Number classes). So instead of using Integer use Long.
 

Regards, 
Dean Rush 


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of David Seto
Sent: Wednesday, August 05, 2009 2:01 PM
To: [email protected]
Subject: [java programming] Lab 1011 exercise 1.2



 

 

3. (For your own exercise - this is not a homework) Modify
ClassAndObject.java as following.  

*       Create another object instance of Long class using new keyword.  

*       Display it using Sytem.out.println(..) method. 

What does Long class mean? Or is this a typo and it should be integer class.






--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to