List of usage examples for java.lang Short Short
@Deprecated(since = "9") public Short(String s) throws NumberFormatException
From source file:Main.java
public static void main(String[] args) { Short sObj1 = new Short("100"); System.out.println(sObj1);// w w w . jav a 2 s . c om String str = "100"; Short sObj2 = Short.valueOf(str); System.out.println(sObj2); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); short s = shortObject.shortValue(); System.out.println("short:" + s); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); byte b = shortObject.byteValue(); System.out.println("byte:" + b); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); long l = shortObject.longValue(); System.out.println("long:" + l); }
From source file:Main.java
public static void main(String[] args) { Short shortValue1 = new Short("10"); Short shortValue2 = new Short("11"); System.out.println(shortValue1.equals(shortValue2)); }
From source file:Main.java
public static void main(String[] args) { Short shortValue1 = new Short("10"); Short shortValue2 = new Short("11"); System.out.println(shortValue1.compareTo(shortValue2)); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); int i = shortObject.intValue(); System.out.println("int:" + i); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); double d = shortObject.doubleValue(); System.out.println("double:" + d); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("1000"); System.out.println(shortObject); }
From source file:Main.java
public static void main(String[] args) { Short shortObject = new Short("10"); float f = shortObject.floatValue(); System.out.println("float" + f); }