The main class of the program must be called Main.
A sample solution using standard JDK classes:
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
java.io.BufferedRea…
read more
void main (String[] args)
{
java.io.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
String s;
while (!(s=notNull(r.readLine())).startsWith("42")) System.out.println(s);
}