exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 195 discussion

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

Given the code fragment:



What is the result?

  • A. [Red:75, Red: 100, Yellow:50, Yellow:75]
  • B. [Yellow:75, Yellow:50, Red:100, Red:75]
  • C. An Exception is thrown at runtime.
  • D. [Yellow:50, Yellow:75, Red:75, Red:100]
  • E. [Red:100, Red:75, Yellow:75, Yellow:50]
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
ASPushkin
6 months, 3 weeks ago
Selected Answer: C
List.of creates unmodifiable list you can’t sort this list in a straightforward manner. clrs.sort() throws runtime exception : java.lang.UnsupportedOperationException in the case of reqular List the answer is A (sorting on the hue field and then on value)
upvoted 1 times
...
d7bb0b2
6 months, 4 weeks ago
Selected Answer: C
C is correcrt List.of is an inmutable cannot add, sort or modified
upvoted 1 times
...
d7bb0b2
7 months ago
C is correct, because List is inmutable, that is not add, remove, update elements or sort List
upvoted 1 times
...
Felipe47
7 months ago
C is correct. List.of is a List inmmutable!
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