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.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
String s;
while (!(s=r.readLine()).startsWith("42")) System.out.println(s);
}
}
created
last reply
- 82
replies
- 8.0k
views
- 46
users
- 4
likes
- 8
links
There are 82 replies with an estimated read time of 14 minutes.