ExamQuestions.com

Register
Login
Java SE 8 Programmer Exam Questions

Oracle

Java SE 8 Programmer

17 / 76

Question 17:

Given the following class: 
image
And given the following main method, located in another class: 
image
Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? 

Answer options:

A. this.amount = 0;
B. amount = 0;
C. acct (0) ;
D. acct.amount = 0;
E. acct. getAmount () = 0;
F. acct.changeAmount(0);
G. acct.changeAmount(-acct.amount);
H. acct.changeAmount(-acct.getAmount());