Functional Interfaces in Java 8 Explained
Test your knowledge

Functional Interfaces in Java 8 Explained

← Back to the tutorial
  1. 1. What is a functional interface in Java 8?
  2. 2. What is the primary purpose of functional interfaces?
  3. 3. Which annotation can mark an interface explicitly as a functional interface?
  4. 4. What does the compiler do when an interface annotated with @FunctionalInterface has two abstract methods?
  5. 5. Is the @FunctionalInterface annotation mandatory for an interface to be a functional interface?
  6. 6. Which of these interfaces, which existed before Java 8, is a functional interface?
  7. 7. What is the single abstract method of java.util.concurrent.Callable<V>?
  8. 8. Which abstract method does java.util.function.Predicate<T> declare?
  9. 9. The tutorial groups functional interfaces into three types. Which of these is NOT one of them?
  10. 10. A user-defined interface has one abstract method and no @FunctionalInterface annotation. Can a lambda expression implement it?
0 of 10 answered