Hi, I am using this site to teach myself, I havnt coded anything since uni and even then it was badly and in C++ lol.
When I try submitting the following code for the TEST problem (the 42 one) I get a runtime NZEC error. Two things, what it is, and what am I doing wrong?
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int data;
do {
Scanner input = new Scanner(System.in);
data = input.nextInt();
if(data != 42) {
System.out.println(data);
}
} while(data != 42);
}