LearnFrenzy
Sign in Take a free test

Lambda Expressions · Lambda Expressions MCQ · Question 8

An unbound instance method reference Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 8 Back to Exercise

String::toUpperCase used as a Function<String, String> is equivalent to …

  • A () -> String.toUpperCase()
  • B s -> s.toUpperCase() Correct
  • C s -> String.toUpperCase(s)
  • D new String().toUpperCase()
Correct Answer: Option B

The first parameter becomes the object the method is called on.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links