Online Java Compiler By
JavaTpoint.com
public class DecodeExample { public static void main(String[] args) { //Wrong input, it will throw Exception String decimalValue = "hello"; //String Value decoding into Short Short dec = Short.decode(decimalValue); System.out.println("decoded String value in to Short = " + dec); }}
Output