- In Java, type of a variable doesn't completely determine type of object to which it refers
BankAccount aBankAccount = new SavingsAccount(1000);
// aBankAccount holds a reference to a SavingsAccount
- Method calls are determined by type of actual object, not type of object reference
BankAccount anAccount = new CheckingAccount();
anAccount.deposit(1000); // Calls "deposit" from CheckingAccount
- Compiler needs to check that only legal methods are invoked
Object anObject = new BankAccount();
anObject.deposit(1000); // Wrong!