package org.example; // Super Class public class Persons { // method public void typeofPerson() { System.out.println("I am one of the many people here. Either a student or instructor"); } } // Persons // Sub Class class Student extends Persons { // Override method @Override public void typeofPerson() { System.out.println("I am a student"); } } // Student class Teacher extends Persons { // Override method @Override public void typeofPerson() { System.out.println("I am a teacher"); } }