Home Help Java I Java Integer class



Java Integer class
Posted on: June 17, 2009 at 12:00 AM
Java provides wrapper classes corresponding to each primitive data types in its "lang" package.

Java Integer class

     

Java provides wrapper classes corresponding to each primitive data types in its "lang" package. These classes represent the primitive values as objects offers utility methods to manipulate the values. For example, Integer class wraps a value of type int in an object. It's constructor can take int value or integer value in String format. Converting primitive types into the corresponding wrapper object can be helpful in situations where only objects can be utilized. For example, if you want to store a set of int values in a Vector, the values in a Vector must be objects and not primitives. In that case you need to convert int values into Integer objects.

Read more at:

http:/www.roseindia.net/java/beginners/entervaluesfromkeyboard.shtml

 

Related Tags for Java Integer class:
cclassobjectobjectsmethodsclassesmethodipvalueprimitiveutilityvaluestosseeilitlimitulimmanasmntjclesmeobjsatlateivprereprutilvautissrithaluctsfejeprmiodso


More Tutorials from this section

Ask Questions?    Discuss: Java Integer class  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.