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






Short: 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.Short.MAX_VALUE
2.new Short(String s)
3.new Short(short value)
4.Short: byteValue()
5.Short: doubleValue()
6.Short: floatValue()
7.Short: intValue()
8.Short: longValue()
9.Short: parseShort(String s,int radix )
10.Short: shortValue()
11.Short: toString()