Q1
What is a lambda expression in Java used for?
mediumView Answer & ExplanationHide Answer & Explanation
Correct Answer: It provides a concise way to represent an instance of a functional interface, often for short pieces of behavior
Explanation:
Lambda expressions were introduced to reduce the verbosity of anonymous inner classes, especially when working with interfaces that have a single abstract method, such as Runnable or Comparator.