Solved

Which Statement Is True About the Following Constructor of the BankAccount

Question 10

Multiple Choice

Which statement is true about the following constructor of the BankAccount class? public BankAccount(double balance)
{
This.balance = balance;
}


A) The code has a syntax error.
B) The code has a logic error.
C) You can't have an instance variable and a parameter variable with the same name.
D) The code sets the instance variable balance to the parameter variable balance.

Correct Answer:

verifed

Verified

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

Related Questions