Given the definition of the Vehicle class:
and this code fragment:
Vehicle v = new Vehicle (100);
v.increSpeed(60);
What is the result?
A. Velocity with new speed
B. A compilation error occurs at line n1.
C. A compilation error occurs at line n2.
D. A compilation error occurs at line n3.
A
No error. probably wrong with question.
answer is a and speed is 1
Correct