new Float(float value) : Float « java.lang « Java by API






new Float(float value)

  

        
public class MainClass {
  public static void main(String[] args) {
    float f = -29.6f;
    Float f2 = new Float(f);
    System.out.println(f2.floatValue());
  }
}

   
    
  








Related examples in the same category

1.Float.MAX_VALUE
2.Float.MIN_VALUE
3.new Float(String s)
4.Float: byteValue()
5.Float: floatValue()
6.Float: compare(float f1, float f2)
7.Float: compareTo(Float anotherFloat)
8.Float: doubleValue()
9.Float: intValue()
10.Float: isInfinite(float v)
11.Float.isNaN() Returns true if this Float value is a Not-a-Number (NaN),
12.Float: parseFloat(String s)
13.Float: shortValue()
14.Float: toString()
15.Float: toString(float f)
16.Float: valueOf(String stringValue)