Java examples for Language Basics:short
Convert String to Short
public class Main { public static void main(String[] args) { //from ww w . jav a2s . c o m Short sObj1 = new Short("100"); System.out.println(sObj1); String str = "100"; Short sObj2 = Short.valueOf(str); System.out.println(sObj2); } }