Solved

Given the Following Constructor for the BankAccount Class, What Output

Question 62

Multiple Choice

Given the following constructor for the BankAccount class, what output is generated by a call to new BankAccount() ?
Public BankAccount()
{
System.out.println(balance) ;
}


A) The code fragment has a syntax error and does not compile.
B) 1000.0
C) 0.0
D) You cannot print out the value of an uninitialized instance variable.

Correct Answer:

verifed

Verified

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

Related Questions