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






Byte: 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.Byte.MAX_VALUE
2.Byte.MIN_VALUE
3.new Byte(byte value)
4.new Byte(String s)
5.Byte: byteValue()
6.Byte: doubleValue()
7.Byte: floatValue()
8.Byte: intValue()
9.Byte: longValue()
10.Byte: shortValue()
11.Byte: toString(byte b)