import java.io.{BufferedReader, InputStreamReader} object Main { def main(args: Array[String]) { var stdin = new BufferedReader(new InputStreamReader(System.in)); var line = stdin.readLine(); while(false == line.equals("42")) { System.out.println(line); line = stdin.readLine(); } }}
1 2 10 42 11
/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'
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!