Problem scenario
When trying to compile a Java program, you get this output:
ContInt.java:15: error: expected
System.out.println(“test”);
^
ContInt.java:15: error: illegal start of type
System.out.println(“test”);
^
What do you do?
Solution
Create a class for the System.out.println statement to be in.
Here is code that would cause the error:
import java.util.Scanner; …