Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a method reference in Java?
Think about how we can shorten lambda expressions.
How would you reference a static method?
Recall the structure `ClassName::methodName`.
What does a method reference use?
It's a key part of the syntax.
True or False: Method references can only be used for static methods.
Remember the different types of method references.
Create a Java application that filters a list of integers, retaining only the even numbers using a method reference.
Think about how `filter` can leverage a method reference for more clarity!
Implement a Java program that transforms a list of strings to their uppercase representation using method references.
How might `String::toUpperCase` simplify the transformation?
5 more questions in this section. Enroll free to practise them all.
Enroll free