Online Java Compiler By
JavaTpoint.com
public class ShortParseShortExample1 { public static void main(String[] args) { //with Positive String Value String x = "100"; // it returns signed decimal short value of string short sValue = Short.parseShort(x); // printing signed parseShort value System.out.println("String "+x +" , parse value into parseShort =" + sValue); } }
Output