Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is type inference in Java?
Think about how Java provides types automatically.
Define a lambda expression that returns the square of an integer.
Remember the syntax format for lambda expressions.
What feature allows Java to determine the type of lambda parameters automatically?
Think about how the compiler helps manage types.
True or False: Target typing is irrelevant when using lambda expressions.
Recall what role functional interfaces play.
Write a lambda expression to sort a list of integers in descending order while demonstrating type inference and target typing.
Think about what kind of functional interface you're working with.
Create a simple functional interface and implement it using a lambda expression, ensuring you incorporate type inference.
Focus on defining the method signature first.
4 more questions in this section. Enroll free to practise them all.
Enroll free