Float: valueOf(String stringValue) : Float « java.lang « Java by API






Float: valueOf(String stringValue)

  
/*
 * Output:
 
true
c
12
2
13245
12341234
11234.123
4.321324123412341E10


 */

public class MainClass {

  public static void main(String args[]) {

    Boolean bool = Boolean.valueOf("true");
    Character c = new Character('c');
    Byte b = Byte.valueOf("12");
    Short s = Short.valueOf("2");
    Integer i = Integer.valueOf("13245");
    Long l = Long.valueOf("12341234");
    Float f = Float.valueOf("11234.1234");
    Double d = Double.valueOf("43213241234.123412341234");

    System.out.println(bool);
    System.out.println(c);
    System.out.println(b);
    System.out.println(s);
    System.out.println(i);
    System.out.println(l);
    System.out.println(f);
    System.out.println(d);
  }
}
           
         
    
  








Related examples in the same category

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