JAVA What is the scope of odometer defined on line 2 1 public class SimpleCar { 2 private int odometer; 3 public void driveForward(int miles) { 4 odometer = odometer + miles; 5 } 6 public void...



JAVA



What is the scope of odometer defined on line 2



1 public class SimpleCar {
2 private int odometer;
3 public void driveForward(int miles) {
4 odometer = odometer + miles;
5 }
6 public void changeOdometer(int miles) {
7 int odometer;
8 odometer = miles;
9 }

10}



A. method driveForward()

B. odometer is not defined

C. method changeOdometer()

D. all of class SimpleCar


Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here