fork download
  1. import java.io.{BufferedReader, InputStreamReader}
  2.  
  3. object Main {
  4. def main(args: Array[String]) {
  5. var stdin =
  6. new BufferedReader(new InputStreamReader(System.in));
  7. var line = stdin.readLine();
  8. while(false == line.equals("42")) {
  9. System.out.println(line);
  10. line = stdin.readLine();
  11. }
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
/opt/scala-2.9.1.final/bin/scalac: line 83: syntax error near unexpected token `('
/opt/scala-2.9.1.final/bin/scalac: line 83: `    echo "      Class Main should contain method: def main(args: Array[String])." 1>&2'
stdout
Standard output is empty