fork download
  1. ;/* package whatever; // don't place package name! */
  2.  
  3. /* The class name doesn't have to be Main, as long as the class is not public. */
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. java.io.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
  9. String s;
  10. s = r.readLine();
  11. while (s != null) {
  12. System.out.println(s);
  13. s = r.readLine();
  14. //System.out.println(s);
  15. //if (s == null) break;
  16. }
  17. //while (!(s=r.readLine()).startsWith("42")) System.out.println(s);
  18. }
  19. }
Success #stdin #stdout 0.08s 212416KB
stdin
5
6
42
7
8
stdout
5
6
42
7
8