Observe the below interface. interface B{ public float display(); } Which of the following are valid lambda expression for the above interface? Select one or more:
B b1=( )->{ return a; }; B b1=( )->{ float a=10.5f; return a; }; B b1=( ) -> float a=10.5f; return a; int a=15; B b1=( )->{ return a; } ;
Answers
Answered by
0
Answer:
Lambda expression is a new and important feature of Java which was included in Java SE 8. It provides a clear and concise way to represent one method interface using an expression. It is very useful in collection library. It helps to iterate, filter and extract data from collection.
Similar questions
English,
17 hours ago
Environmental Sciences,
17 hours ago
Hindi,
1 day ago
Math,
1 day ago
Social Sciences,
8 months ago
Sociology,
8 months ago