Solved

Consider the Following Code Snippet

Question 63

Multiple Choice

Consider the following code snippet:
Public class Vehicle
{
Private String model;
Private double rpm;
) . .
}
Which of the following methods would correctly remove the values of the class instance variables?


A) public void reset()
{
Model = null;
Rpm = 0;
}
B) public void reset()
{
Model.clear() ;
Rpm = 0;
}
C) public void reset(String aModel, double theRpm)
{
Model = aModel;
Rpm = theRpm;
}
D) public void reset("",0)
{
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions