import java.io.*; class TestGets { public static String gets() throws Exception { BufferedReader r = new BufferedReader( new InputStreamReader(System.in)); return r.readLine(); } public static void main(String[] args) throws Exception{ System.out.print("Введите целое число: "); int a=Integer.parseInt(gets()); System.out.println("a="+a); } }