Preview:
class msRichards {
  protected
  public void favClass() {
    System.out.println("My FAVOURITE Class is...");
  }
}

class course extends msRichards {
  private String courseName = "ICS4U";
  public static void main(String[] args) {
    course myCourse = new course();
    myCourse.favClass();
    System.out.println( myCourse.grade + " " + myCourse.courseName + "!");
  }
}

class Main {

	public static void main(String[] args) {
        msRichards newCourse = new course();
    	msRichards firstCourse = new courseICS3U();
        msRichards secondCourse = new courseICS4U();
        
       newCourse.favClass();
       newCourse.favClass();
       newCourse.favClass();
        
       }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter