Solved

What Will Be Output from the Following Statements That Use

Question 38

Multiple Choice

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


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

Correct Answer:

verifed

Verified

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

Related Questions