Question: Below is a four line snippet of correct code. Choose all of the lines that demonstrate polymorphism. Assume inherits from and implements a method Car
Below is a four line snippet of correct code. Choose all of the lines that demonstrate polymorphism. Assume inherits from and implements a method Car myCar = new SportsCar(); SportsCar yourCar = new SportsCar(); int w= yourCar. getyear(); System. out. print ln(yourCar, tostring()); The total number of correct answers is in range [0,4]. Line 4 Line 1 Line 2 Line 3
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
