Consider the implementation of the following car class. public class Car { priva
ID: 3656063 • Letter: C
Question
Consider the implementation of the following car class. public class Car { private double enginePower; private int speed; private String color, vinNumber; public Car() { enginePower = 3.2; color = "White"; speed = 0; vinNumber = "1010"; } public void speedUp(int newSpeed) { speed = newSpeed; } public void stop() { speed = 0; } public int getCurrentSpeed() { return speed; } What is output of the following code? Car carl = new Car(); Car car2 = new Car(); car1.speedUp(100); car2.speedUp(50); carl .stop(); int x = carl. getCurrentSpeed(); int y = car2.getCurrentSpeed(); System.out.println(x + " " + y); 100 50 50 50 0 50 None of the above.Explanation / Answer
50 50