exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 110 discussion

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

Given:



and



What is the result?

  • A. test:null
  • B. test:1
  • C. A ClassCastException is thrown at runtime.
  • D. null:null
  • E. The compilation fails.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

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
ASPushkin
6 days, 19 hours ago
Selected Answer: E
MyClass.java:19: error: incompatible types: int cannot be converted to CAP#1 type.setValue(1234); ^ where CAP#1 is a fresh type-variable: CAP#1 extends Object from capture of ? Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
upvoted 1 times
...
Stavok
10 months, 3 weeks ago
Selected Answer: E
E is correct The method setValue(capture#1-of ?) in the type MyType<capture#1-of ?> is not applicable for the arguments (int)
upvoted 2 times
...
Obalt
1 year, 4 months ago
Correct answer is E
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