All About Class Integer in Java



Class Integer wraps a value of the primitive type int into an Object.An Object of type Integer contains a single field whose type is int.
The structure of the class Integer is given below:

public final class java.lang.Integer extends java.lang.Number{
//Member Elements
public final static int MAX_VALUE;
//MAX_VALUE=2147483647
public final static int MIN_VALUE;
//MIN_VALUE=-2147483648
//Constructors
public Integer(int value);
//constructs a newly created Integer object and allocate memory space that represents the 
//primitive int argument
public Integer(String str);
//Constructs a newly allocated Integer object that represents the int value of type int
//represented by String str.The string is converted to a int value by valueOf() method.
//This method may throw NumberFormatException if the string does not contain a parsable number.
//Methods:
public double doubleValue();
public Boolean equals(Object obj);
public float floatValue();
public string toString();
public static Integer getInteger(String value);
public static Integer getInteger(String value,int value2);
public static Integer getInteger(String value,Integer value2);
public static int parseInt(String str);
public static int parseInt(String str,int radix);
public static String toBinaryString(int i);
public static String toOctalString(int i);
public static String toString(int i);
public static String toString(int i,int radix);
public static Integer valueOf(String str);
public static Integer valueOf(String str,int radix);
public int hashCode();
public int intValue();
public long longValue();
}

 



All About Class Integer in Java All About Class Integer in Java Reviewed by Animesh Chatterjee on October 05, 2018 Rating: 5

No comments:

Powered by Blogger.