• Subclass Constructor and super Keywords: Since constructors are not members, they are not inherited by the subclasses. However, the constructor of the superclass can be invoked from the subclass. The super keyword makes this possible, as it refers to superclass objects. It can be used to call superclass methods, as well as access the superclass constructor.
  • Method Overloading: A feature that allows a class to have multiple method with the same name, but they each have to have different parameters.
  • Method Overriding: A feature that occurs when a subclass has a method with the same name as a method in the superclass. Essentially, the subclass implements a method declared by the superclass.
  • Abstract Class and Abstract Method: An abstract class is a type of restricted class that cannot be be used to create objects. To access it, it has to be inherited from another class. An abstract method can only be used in an abstract class, and it does not comprise of a body. The body of an abstract method is provided by the subclass that inherits it.
  • toString(), equals(), and hashCode() standard methods: toString() converts an object variable into a string. equals() is typically used to check for equality between two string variables. hashCode() returns the integer hash code value of an object.
  • Object Late Binding: Also known as dynamic linkage, late binding occurs when the name of the method being called upon an object is looked up at runtime.
  • Polymorphism: Referring to "many forms", polymorphism occurs when there are many classes that relate to each other by inheritance. Polymorphism generally involves using inherited attributes and methods to perform different kinds of tasks among different subclasses.
  • Big O Notation: A mathematical notation that deals with the limiting behavior of a function when the argument goes toward a particular value or infinity.
public class VocabFour {
    int a;
    public VocabFour() {
        a = 7;
    }

    public void methodOne() {
        System.out.println("Method one works!");
    }

    public void methodOne(int i) {
        System.out.println("Method one with integer " + i + " works!" );
    }

    public void methodTwo() {
        System.out.println("Superclass method two works!");
    }
}

class SubVocabFour extends VocabFour {
    // Method overriding
    public void methodTwo() {
        // super keyword
        super.methodTwo();
        System.out.println("Subclass method two works!");
    }

    public static void main(String[] args) {
        SubVocabFour myObj = new SubVocabFour();
        // Method overloading
        myObj.methodOne();
        myObj.methodOne(7);
        myObj.methodTwo();

        Integer num = 7;
        num.toString();
        System.out.println("toString() method: " + num.getClass());

        String one = "Sup";
        String two = "Sup";
        System.out.println("equals() method: " + one.equals(two));

        System.out.println("hashCode() method for String variable two: " + two.hashCode());
    }
}

SubVocabFour.main(null);
Method one works!
Method one with integer 7 works!
Superclass method two works!
Subclass method two works!
toString() method: class java.lang.Integer
equals() method: true
hashCode() method for String variable two: 83502
// Abstract class and method
public abstract class AbsVocabFour {
    public abstract void printMessage();
}

// Child class inherits the abstract class defines body for the abstract method
class SubAbsVocabFour extends AbsVocabFour {
    public void printMessage() {
        System.out.println("Abstract message successful!");
    }
    public static void main(String[] args) {
        SubAbsVocabFour myObj = new SubAbsVocabFour();
        myObj.printMessage();
    }
}

SubAbsVocabFour.main(null);
Abstract message successful!
// Polymorphism
class Sport {
    public void typeOfBall() {
        System.out.println("The sport uses this kind of ball");
    }
}

class Basketball extends Sport {
    public void typeOfBall() {
        System.out.println("The sport uses a basketball");
    }
}

class Soccer extends Sport {
    public void typeOfBall() {
        System.out.println("The sport uses a soccer ball");
    }
}

class Main {
    public static void main(String[] args) {
        Sport mySport = new Sport();
        // Late object binding
        Sport myBasketball = new Basketball();
        Sport mySoccer = new Soccer();
        mySport.typeOfBall();
        myBasketball.typeOfBall();
        mySoccer.typeOfBall();
    }
}

Main.main(null);
The sport uses this kind of ball
The sport uses a basketball
The sport uses a soccer ball