Double: floatValue() : Double « java.lang « Java by API






Double: floatValue()

  
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

1.Double.MAX_VALUE
2.Double.MIN_VALUE
3.Double.NEGATIVE_INFINITY
4.Double.POSITIVE_INFINITY
5.new Double(double value)
6.new Double(String stringValue) '314159E-5'
7.Double: byteValue()
8.Double: compare(double d1, double d2)
9.Double: compareTo(Double anotherDouble)
10.Double: doubleValue()
11.Double: equals
12.Double: intValue()
13.Double: isInfinite()
14.Double: isNaN()
15.Double: parseDouble(String s)
16.Double: shortValue()
17.Double: toString(double d)
18.Double: valueOf(String stringValue)