exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 129 discussion

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

Given:

What is the result?

  • A. Compilation fails.
  • B. 3 5
  • C. 0 0
  • D. 9 25
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
v323rs
Highly Voted 4 years, 12 months ago
The correct answer id B. 3 5
upvoted 13 times
...
Harid
Highly Voted 4 years, 4 months ago
System.out.println(x + " " + y); // 3 5 System.out.println(obj.x + " " + obj.y); // 9 25
upvoted 11 times
...
MPignaProTech
Most Recent 2 months, 4 weeks ago
Selected Answer: B
initialize is not a seter so, response is B
upvoted 1 times
...
akbiyik
2 years, 1 month ago
Selected Answer: B
The correct answer is B. public static void main (String [] args) { int x = 3, y = 5; Test obj = new Test(x, y); System.out.println(x + " " + y); // x = 3, y= 5; System.out.println(obj.x + " " + obj.y); // x = 9, y= 25; }
upvoted 1 times
...
carloswork
2 years, 2 months ago
Selected Answer: B
Answer is B. To test: public class Test { int x, y; public Test (int x, int y) { initialize(x, y); } public void initialize (int x, int y) { this.x = x * x; this.y = y * y; } public static void main (String [] args) { int x = 3, y = 5; Test obj = new Test(x, y); System.out.println(x + " " + y); } }
upvoted 1 times
...
iSnover
2 years, 3 months ago
Selected Answer: B
The right answer is the letter B, it prints the values ​​of the variables x and Y on the last line, the test type object is just a distractor, be careful.
upvoted 2 times
...
Ayla
4 years, 2 months ago
answer B
upvoted 2 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