All About Class Long in Java

0
30
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share


Long class wraps a value of the primitive type long in an Object.An object of type long contains a single field whose type is long.

The Class Long structure is given as:


public final class java.lang.Long extends java.lanf.Number{
//Member Elements
public final static long MAX_VALUE;
//MAX_VALUE=9223372036854775807L
public final static long MIN_VALUE;
//MIN_VALUE=-9223372036854775808L
//constrcutors
public Long(long value);
//constructs a newly created Long object and allocate memory space that represents the 
//primitive long argument
public Long(String str);
//Constructs a newly allocated Long object that represents the long value of type long
//represented by String str.The string is converted to a long 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 static Long getLong(String value);
public static Long getLong(String value,Long value2);
public static Long getLong(String value,Long value2);
public int hashCode();
public int intValue();
public long LongValue();
public static long parseLong(String str);
public static long parseLong(String str,int radix);
public static String toBinaryString(long i);
public static String toHexString(long i);
public static String toOctString(long i);
public string toString();
public static String toString(long i);
public static String toString(long i,int radix);
public static Long valueOf(String str);
public static Long valueOf(String str,int radix);
}
 
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here