Question OOP-CLS-0048
MediumA class Car has a method getSpeed() that is called on two different Car objects. How does the method know which object's speed to return?
- A.
Through a global variable
- B.
It needs the speed passed as an argument
- C.
Sign up free to see the answer and a step-by-step explanation.