All About Class Number in Java

0
23
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

The Abstract class Number is the super class for all numerical primitive types like- Byte,Short,Integer,Long,Float,Double. This class defines the conversion functions that these classes implement. The structure of Number class is as follows:

public abstract Class java.lang.Number extends java.lang.Object implements Serializable{
//Constructor
public Number();
//Methods:
public abstract double doubleValue();
public abstract float floatValue();
public abstract int intValue();
public abstract long longValue();
public byte byteValue();
public short shortValue();
}
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