Object obj = new Lunch(); //valid
Lunch sandwich = new Sandwich(); //valid
Salad lunch = new Lunch(); //invalid
Salad lunch = new Lunch(); //valid
Salad caeser = new Sandwich(); //invalid because
Lunch lunch = new Object(); //invalid because superclass cannot extend subclass
Sandwich sandwich = new Sandwich(); //valid
Lunch ceaser = new Salad(); //valid
Sandwich salad = new Salad(); //invalid, subclass cannot extend subclass
Object caeser = new Salad(); //valid,
Superclass always points to the subclass, left side argument always points to the right side
To use the unique method in the subclass in the superclass, do a type cast so that both objects will be subclasses
Lunch b = new Sandwich();
Sandwich d = (Sandwich)b;
Lunch c = new Salad();
System.out.println(c instanceof Lunch); //prints true