exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 87 discussion

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

Given:



What is the result?

  • A. abyssinian
    oxicat
    korat
    laperm
    bengal
    sphynx
  • B. abyssinian
    bengal
    korat
    laperm
    oxicat
    sphynx
  • C. sphynx
    oxicat
    laperm
    korat
    bengal
    abyssinian
  • D. nothing
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
2 months ago
MyClass.java:9: error: cannot find symbol cats.sort((var a, var b)-> -a.compareTo(b)); ^ //generic method parameter type set as Comparable otherwise compilation error Comparator<Comparable> c = (a, b) -> -a.compareTo(b); or Comparator<String> c = (a, b) -> -a.compareTo(b); or Comparator c = (a, b) -> 0; //here missed generic method parameter type int i = c.compare("3","7");
upvoted 1 times
...
ASPushkin
6 months, 1 week ago
Selected Answer: C
interesting thing : var cats = new ArrayList<>(Arrays.asList(catNames)); Diamond Operator - compiler's type inference feature determines the most suitable constructor declaration that matches the invocation. This is not a row type.
upvoted 1 times
...
mendjijet
11 months ago
Selected Answer: C
C is corrrect the sort is inversed -a.compareTo(b)
upvoted 1 times
...
Samps
1 year ago
C is correct
upvoted 1 times
...
Omnisumem
1 year, 4 months ago
Selected Answer: C
Tested: C.
upvoted 2 times
...
eldonivan
1 year, 4 months ago
The default sort order is ascending. The line -a.compareTo(b) changes the order to descending. The answer is: C
upvoted 3 times
...
tmuralimanohar
1 year, 6 months ago
Answer:C
upvoted 2 times
...
Stavok
1 year, 7 months ago
Selected Answer: C
C is correct TESTED
upvoted 3 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