Multiple Choice
Assume the method below has been added to the BankAccount class. public void transfer (BankAccount source, double amount)
{
Balance = balance + amount;
Source.balance = source.balance - amount;
}
What will be output from the following statements that use the revised BankAccount class?
BankAccount first = new BankAccount (100.0) ;
BankAccount second = new BankAccount (300.0) ;
First.transfer (second, 50.0) ;
System.out.println (first.getBalance() + " "
+ second.getBalance() ) ;
A) 100.0 300.0
B) 150.0 250.0
C) 150.0 300.0
D) 100.0 250.0
Correct Answer:

Verified
Correct Answer:
Verified
Q8: When are local variables initialized?<br>A)Local variables are
Q25: What is the return type of a
Q74: Consider the following method header for the
Q75: We want to create a class that
Q76: Choose the method header that goes with
Q80: Instance variables that are object references are
Q80: We want to create a class that
Q84: What do static variables belong to?<br>A) a
Q96: Which of the following declares a sideLength
Q100: Which of the following is an instance