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. while (!(s=r.readLine()).startsWith("42")) System.out.println(s);
  11. }
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
Mozart Compiler 1.4.0 (20080704) playing Oz 3

%%% feeding file prog.oz

%*************************** parse error ************************
%**
%** syntax error, unexpected '{', expecting T_end
%**
%** in file "./prog.oz", line 5, column 0
%** ------------------ rejected (1 error)
stdout
Standard output is empty