All About Class Number in Java

0
171
Spread the love
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

Class Number in Java
Class Number in Java

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
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here