The following code
/*
Write a program that asks a number from the user, then says whether the number is prime or not. Remember that
a number that is divisible by any number apart from 1 and itself is prime. You can use the modulo operator (if
a % b is zero, then a is divisible by b).
*/
println ("Enter an integer");
int b = readInt();
is correct, but it produces an error:
JavaDecaf Error: Stand-alone method not started properly
file:/tmp/error1.jdc
If the comments are removed, the code compiles without problems.