BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); // int g = Integer.parseInt(s); int count =2; while((count >= 1) && !(count<0)) { String s = reader.readLine(); System.out.println(s); count--; }