public class MainClass
{
public static void main( String args[] ) //main
{
GradeBook myGradeBook = new GradeBook(); //new for allocation memory
myGradeBook.displayMessage(); //calling of a method.
}
}
class GradeBook
{
public void displayMessage()
{
System.out.println (" Welcome to the Grade Book...");
}
public class MainClass
{
public static void main( String args[] )
{
GradeBook myGradeBook = new GradeBook();
myGradeBook.displayMessage();
}
}
class GradeBook
{
public void displayMessage()
{
System.out.println( "Welcome to the Grade Book!" );
}
}
}