1z1-808 Exam Question 46

Given:
public class TestField {
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) {
TestField m1 = new TestField();
m1.x = 100;
m1.y = 200;
TestField m2 = new TestField();
m2.doStuff(m1.x, m1.y);
m1.display();
m2.display();
}
}
What is the result?
  • 1z1-808 Exam Question 47

    Given:

    And given the commands:

    What is the result?
    TRUE null
  • 1z1-808 Exam Question 48

    Given:
    public class String1 {
    public static void main(String[] args) {
    String s = "123";
    if (s.length() >2)
    s.concat("456");
    for(int x = 0; x <3; x++)
    s += "x";
    System.out.println(s);
    }
    }
    What is the result?
  • 1z1-808 Exam Question 49

    Given:

    What is the result?
  • 1z1-808 Exam Question 50

    Given:

    What is the result?