Solved

Insert the Missing Code in the Following Code Fragment

Question 39

Multiple Choice

Insert the missing code in the following code fragment. This fragment is intended to initialize an instance variable.
Public class Vehicle
{
Int numAxles;
Public Vehicle(int axles)
{
NumAxles = axles;
}
Public Vehicle()
{
_________;
}
}
Which of the following lines of code will allow the second constructor to call the first constructor?


A) this. numAxles(0) ;
B) this(0) ;
C) this(axles) ;
D) this(numAxles) ;

Correct Answer:

verifed

Verified

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

Related Questions