Double: shortValue() : Double « java.lang « Java by API
- Java by API
- java.lang
- Double
Double: shortValue()
public class Main {
public static void main(String[] args) {
Double dObj = new Double("10.50");
byte b = dObj.byteValue();
System.out.println(b);
short s = dObj.shortValue();
System.out.println(s);
int i = dObj.intValue();
System.out.println(i);
float f = dObj.floatValue();
System.out.println(f);
double d = dObj.doubleValue();
System.out.println(d);
}
}
/*
10
10
10
10.5
10.5
*/
Related examples in the same category