exam questions

Exam 1z0-829 All Questions

View all questions & answers for the 1z0-829 exam

Exam 1z0-829 topic 1 question 23 discussion

Actual exam question from Oracle's 1z0-829
Question #: 23
Topic #: 1
[All 1z0-829 Questions]

Given:

What is the result?

  • A. 100
    100
    1000
  • B. 101
    101
    1000
  • C. 1001
    100
    1000
  • D. 1001
    1001
    1000
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SrinivasJasti
2 weeks, 3 days ago
Selected Answer: C
this.x is instance variable and int x = 1000 is local variable
upvoted 1 times
...
xplorerpj
6 months, 4 weeks ago
Right answer is C this.x refers to publicly declared/initialized variable
upvoted 1 times
...
james2033
10 months, 4 weeks ago
Selected Answer: C
package q23; public class App { public int x = 100; public static void main(String[] args) { int x = 1000; App t = new App(); t.myMethod(x); System.out.println(x); } public void myMethod(int x) { x++; System.out.println(x); System.out.println(this.x); } } // Result: // 1001 // 100 // 1000
upvoted 3 times
...
Tojose
1 year ago
the right answer is C. 1001 100 1000
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago