exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 37 discussion

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

Given:

What is the result?

  • A. An exception is thrown at runtime.
  • B. -3
  • C. -2
  • D. The compilation fails.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
d7bb0b2
6 months, 4 weeks ago
Selected Answer: D
D is correct y-- modified variable so, y is not efectively final, then compilation error is thrown
upvoted 1 times
...
[Removed]
11 months, 1 week ago
D. Local variable y defined in an enclosing scope must be final or effectively final
upvoted 2 times
...
Stavok
1 year, 1 month ago
Selected Answer: D
java.lang.Error: Unresolved compilation problem: Local variable y defined in an enclosing scope must be final or effectively final D is correct
upvoted 1 times
...
TADIEWA
1 year, 7 months ago
D correct local variable referenced in an inner class should be final or effectively final , here y is post decremented
upvoted 1 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