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:

Verified
Correct Answer:
Verified
Q3: When a method exits, its _ are
Q17: Which line of code is part of
Q33: Consider the following method comment and method
Q34: Assume the method below has been added
Q36: We want to create a class that
Q37: Consider the following code fragment from the
Q41: Given this method comment, fill in the
Q41: In the statement below, amount is referred
Q43: The black boxes from which a program
Q102: Encapsulation allows a programmer to use a