Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java (sun-jdk-1.8.0_51) sample

/* package whatever; // don't place package name! */
 
import java.io.*;
 
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s;
		while (!(s=r.readLine()).startsWith("42")) System.out.println(s);
	}
}
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #Java #sample
ADD COMMENT
Topic
Name
3+9 =