exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 187 discussion

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

Which is a valid statement?

  • A. BiPredicate testEquality = (var x, Integer y) -> (x.equals(y));
  • B. BiPredicate testEquality = (var x, var y) -> (x.equals(y));
  • C. BiPredicate testEquality = var x, var y -> (x.equals(y));
  • D. BiPredicate testEquality = (var x, y) -> (x.equals(y));
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
ASPushkin
6 months, 2 weeks ago
similar to 22, 204
upvoted 1 times
...
ASPushkin
6 months, 2 weeks ago
Selected Answer: B
A) there is no mix var with the explicit types B) ok C) syntax error without brackets D) compound not allowed
upvoted 1 times
...
d7bb0b2
7 months ago
B: Bcos Bipredicated is declared without type and then cannot pass other Type that Object
upvoted 1 times
ASPushkin
6 months, 2 weeks ago
For backward compatibility, assigning a parameterized type to its raw type is allowed. BiPredicate is a raw type from generic type BiPredicate<T,U> where T and U substitute to Object. So it could be any type inherited from Object type.
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