What is the syntax and characteristics of a lambda expression?



What is the syntax and characteristics of a lambda expression?..

Answer / Mohit

A Lambda expression in Java 8 is a block of code that can be passed as an argument to another method. The general syntax is (parameters) -> expression. A Lambda expression captures any local variables from the surrounding context, allowing it to access them within the body.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the use of default method in interface in java?

1 Answers  


static inner classes means..?

1 Answers  


i need example for java abstraction. where we use abstraction and why we need abstraction.

2 Answers   Oracle,


What is "finally" keyword?

10 Answers  


Can You Have Virtual Functions In Java?

1 Answers  


What is supplier in java?

1 Answers  


Describe inheritance as applied to java?

4 Answers  


What is the full meaning of java?

1 Answers  


What are wrapped classes in java programming?

1 Answers  


What is user defined exception in Java?

1 Answers   TCS,


What are types of Java applications?

14 Answers  


What is meant by oops concept in java?

1 Answers  


Categories