Java examples for Language Basics:String
Convert String to short primitive
public class Main { public static void main(String[] args) { String str = new String("10"); short s = Short.parseShort(str); System.out.println(s);/* w w w .j a v a 2s . com*/ } }