Question: Question 5 Given class SimpleCar, which line has a syntax error? 1 Object objCar;objCar = new SimpleCar ( ) ;System - out - println (
Question
Given class SimpleCar, which line has a syntax error? Object objCar;objCar new SimpleCar;SystemoutprintlnobjCartoString; objCardrive;
line class Object is not defined
line a SimpleCar reference cannot be assigned to an Object reference
line toString is not defined in class SimpleCar
line drive is not defined in class Object
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
