Question: Create interface Vehicle, add default method testDrive ( ) . Create new class Car, this class implements Vehicle interface without any methodCreate new class TestVehicle

Create interface Vehicle, add default method testDrive().Create new class Car, this class implements Vehicle interface without any methodCreate new class TestVehicle with main method. In main method, create object of Car and call testDrive method and check output.Add testDrive method in Car class and call testDrive method in main method and check output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!