answer: BD
A. Failed
The Basic format of a method reference is broadly <scope>::<method-name> without parameter names.
C Failed
The Basic format of a method reference is broadly <scope>::<method-name> without parameter names.
But here there is an boolean expression at the right hand.
B correct
Reference to an instance method of a particular object
containingObject::instanceMethodName
D. correct
Reference to an instance method of an arbitrary object of a particular type
ContainingType::methodName
B & D are correct.
A : .filter(Integer::equals(0)); You cannot pass parameter when calling through reference
C: .filter(Member::getYearsMembership() >= testMembershipLength); You cannot call method reference with '()'
B and D are correct because method reference is used only for reference method and constructor not for performing comparison
upvoted 1 times
...
Log in to ExamTopics
Sign in:
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.
ASPushkin
5 months agorami_mlaiel
9 months, 3 weeks agod7bb0b2
1 year ago[Removed]
1 year, 5 months agoMukes877
1 year, 8 months ago