fork download
  1. /* package whatever; // don't place package name! */
  2. import java.until.Scanner;
  3.  
  4. /* The class name doesn't have to be Main, as long as the class is not public. */
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. java.io.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
  10. String s;
  11. while (!(s=r.readLine()).startsWith("42")) System.out.println(s);
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
Main.java:2: package java.until does not exist
import java.until.Scanner;
                 ^
1 error
stdout
Standard output is empty