Question: Explain how polymorphism is used in this Java code List names = new ArrayList (); names.add(Joe); names.add(Billy);
Explain how polymorphism is used in this Java code List names = new ArrayList (); names.add("Joe"); names.add("Billy");
Step by Step Solution
3.34 Rating (154 Votes )
There are 3 Steps involved in it
In the provided Java code polymorphism is utilized through the concept of inheritance and method overriding Interface and Implementation The variable ... View full answer
Get step-by-step solutions from verified subject matter experts
