Java SE 8 Programmer 1Z0–808 Practice Full Test 1
© examsiri.com
Question : 47 of 84
Marks:
+1,
-0
public class MyField {
int x;
int y;
public void doStuff(int x, int y) {
this.x = x;
y = this.y;
}
public void display() {
System.out.print(x + " " + y + " : ");
}
public static void main(String[] args) {
MyField ml = new MyField();
ml.x = 100;
ml.y = 200;
MyField m2 = new MyField();
m2.doStuff(ml.x, ml.y);
ml.display();
m2.display();
}
}What is the result?
Go to Question: