InputStreamReader is = new InputStreamReader(System.in);
BufferedReader bf = new BufferedReader(is);
System.out.print("Enter a value : ");
String s = bf.readLine();
int n = Integer.parseInt(bf.readLine());
System.out.println(s);
System.out.println(n);
OR
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a value");
String s = br.readLine();
int n = Integer.parseInt(br.readLine());
0 Comments