Read short value from console
import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.print("Number input:"); Scanner input = new Scanner(System.in); short n1; n1 = input.nextShort();/*www. j av a2s .c o m*/ System.out.print(n1); } }