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



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

Answer / Ashish Kumar Verma

A Lambda Expression in Java 8 is a small block of code that can be passed around and used in place of an interface. The basic syntax for a lambda expression includes parameters, arrow token (-->), and a body enclosed in curly braces. Characteristics include single-expression functionality with the return keyword being optional.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

public class Base { public void myMethod(int a,intb) {} } // Uses myMethod and then hides it. public class DerivedOne extends Base { private void myMethod(int a,int b); } will this compile or not .yes or no. why

2 Answers  


What is hotjava?

1 Answers  


Is null an object in java?

1 Answers  


using equals method overriding which objects are compared?i.e same class objects or other class objects?Explain me.

4 Answers  


What are the differences between graph and tree?

1 Answers   Amazon,


when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).

3 Answers  


What is parameter tag and what is its use?

1 Answers  


Why transient variables wont participate in serialization?

2 Answers  


What is vector?

1 Answers  


What do you understand by classes in java?

1 Answers  


How do you empty a list in java?

1 Answers  


What is the driver class?

1 Answers  


Categories