Practice Functional Interfaces - 5.6 | 5. Java Streams and Lambda Expressions | Advance Programming In Java
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What is a functional interface?

💡 Hint: Look for the definition of functional interfaces in the previous sections.

Question 2

Easy

Give an example of a functional interface used in Java.

💡 Hint: Think of the interfaces mentioned earlier.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What is a functional interface?

  • An interface with multiple abstract methods
  • An interface with exactly one abstract method
  • An interface with no methods

💡 Hint: Recall the definition we discussed.

Question 2

True or False: A Predicate can return any data type.

  • True
  • False

💡 Hint: What does Predicate do?

Solve 2 more questions and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Create two functional interfaces: one that checks if a number is even and another that returns the square of a number. Implement both using lambda expressions.

💡 Hint: Use your knowledge of Predicate and Function interfaces.

Question 2

Design a Supplier that generates a random integer and a Consumer that accepts an integer and prints if it's odd or even. Implement both using lambda expressions.

💡 Hint: Remember that Suppliers don’t take arguments but give values, and Consumers act on given inputs.

Challenge and get performance evaluation