object oriented programming question about classes in java
I'm trying to understand creating an object of a subtype, but having it declared as a supertype. When would you want to do this, what are the benefits?
ex: Employee abstract class and Manager subclass.
Employee manager = new Manager();
Also is there a difference between a superclass and an abstract class?
Submitted July 13, 2017 at 11:15PM by Kimcheeboy1
via reddit http://ift.tt/2ul06Jy