Question 17 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 17 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given the following class:

public class Checkingaccount {

public int amount;

public Checkingaccount (int amount) {
this.amount = amount;

3

public int getamount () (
return amount;

}

public void changeamount (int x) {
amount += x7

7

And given the following main method, located in another class:

public static void main(string[] args) {
Checkingaccount acct = new CheckingAccount ((int) (Math. random ()*1000)) +
ffline nl
System. out. println (acct. getamount ()) i

Which three lines, when inserted independently at line n1, cause the program to print a 0 balance?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F. G.

ACD.