Assume you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named myCar and the following statement executes correctly: Console.WriteLine("The Car gets {0} miles per gallon", myCar.ComputeMpg()); Within the Car class, the ComputeMpg() method can be .
a. public and static
b. public and nonstatic
c. private and static
d. private and nonstatic
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here