Questions on Lamda Expressions

  • What is an Type of a Lamda Expression ?
    • Functional Interface
  • Can a lambda be put into a variable ?
    • Yes
  • Is a lambda expression an object?
    • Exact Answer : a lambda is an Object without an identity
    • The answer is complex, but no, JVM does not create an object of lamda; the new keyword is not used here which is very heavy i.e when a new is called all the Class hierarchy from Object to All the interface and the abstract class and the concrete parent classes are called and then a object is created. But in case of lambda that does not happen so it is much faster.
  • Why multithreading should not be applied on Lambda?

Leave a Comment