Solved

What Will Be Output from the Following Statements That Use

Question 17

Multiple Choice

What will be output from the following statements that use BankAccount class? BankAccount first = new BankAccount (100) ;
First.deposit (50.0) ;
BankAccount second = new BankAccount (first.getBalance() ) ;
First.deposit (50.0) ;
BankAccount third = new BankAccount (first.getBalance() ) ;
First.deposit (50.0) ;
System.out.println (first.getBalance() + " "
+ second.getBalance() + third.getBalance() ) ;


A) 150.0 200.0 250.0
B) 250.0 250.0 250.0
C) 250.0 150.0 200.0
D) 250.0 200.0 250.0

Correct Answer:

verifed

Verified

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

Related Questions