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. }
Runtime error #stdin #stdout 0.08s 212416KB
stdin
b
stdout
b