I wonder how to use Java on SPOJ and why the following two files do not work together, please? Below please find pasted compilation info first, then the two files:
Main.java:8: error: cannot find symbol
GradeBook myGradeBook = new GradeBook();
^
symbol: class GradeBook
location: class Main
Main.java:8: error: cannot find symbol
GradeBook myGradeBook = new GradeBook();
^
symbol: class GradeBook
location: class Main
2 errors
import java.util.*;
import java.lang.*;
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
GradeBook myGradeBook = new GradeBook();
myGradeBook.displayMessage();
}
}
import java.util.*;
import java.lang.*;
class GradeBook
{
public void displayMessage()
{
System.out.println( "Wecome to the Gradebook!" );
}
}