obj.print(100) is called. Inside print(int var1)
• System.out.println(var1); prints 100.
• var2 = var2 + var1; → 200 + 100 = 300, so the static field var2 becomes 300.
• print(); invokes the static overload, which prints the current value of var2 (now 300).
Thus the sequence is 100 then 300, so none of the listed choices match; the correct result is 100 followed by 300.
Hello I guess the Answer on this question should be
100
300
upvoted 4 times
...
This section is not available anymore. Please use the main Exam Page.1z0-811 Exam Questions
Log in to ExamTopics
Sign in:
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.
tabrezshaikh13
Highly Voted 2 years agoahmed_alshehhi
Most Recent 2 months, 2 weeks agoelectri
7 months, 1 week agonosferatu31
8 months, 1 week agoarjunec1
2 years, 6 months agoarjunec1
2 years, 6 months agoDobrevD
2 years, 7 months ago