Multiple Choice Question

Quiz Guidelines

 

QID: 
106
Question: 

What will the following program print when run?

public class ChangeTest {
private int myValue = 0;
public void showOne(int myValue){
myValue = myValue;
}
public void showTwo(int myValue){
this.myValue = myValue;
}
public static void main(String[] args) {
ChangeTest ct = new ChangeTest();
ct.showTwo(200);
System.out.println(ct.myValue);
ct.showOne(100);
System.out.println(ct.myValue);
}
}

Select 1 option

A. 0 followed by 100.
B. 100 followed by 100.
C. 0 followed by 200.
D. 100 followed by 200.
E. 200 followed by 200.
F. 200 followed by 100

Q&A Set: