I have a BankAccount class which is superclass and SavingsAccount and CheckingAccounts as subclasses/derived classes. Very simple classes.
What is the difference between these first 3 lines of code vs next 3 lines of code.
First 3 lines of code"
BankAccount b = new BankAccount(100);
BankAccount s = new SavingsAccount(100);
BankAccount c = new CheckingAccount(200);
Next 3 lines of code"
BankAccount b = new BankAccount(100);
SavingsAccounts s= new SavingsAccount(100);
CheckingAccount c = new CheckingAccount(200);