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






Long: 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.Long.MAX_VALUE
2.Long.MIN_VALUE
3.long.class
4.new Long(String s)
5.new Long(long value)
6.Long: byteValue()
7.Long: doubleValue()
8.Long: floatValue()
9.Long: intValue()
10.Long: longValue()
11.Long: parseLong(String s, int radix)
12.Long: shortValue()
13.Long: toHexString(long i)
14.Long: toString(long i, int radix)