Types of Method References

Description

There are six types of method reference.

  • TypeName::staticMethod - reference to a static method of a class, an interface, or an enum
  • objectRef::instanceMethod - reference to an instance method
  • ClassName::instanceMethod - reference to an instance method from a class
  • TypeName.super::instanceMethod - reference to an instance method from the supertype of an object
  • ClassName::new - reference to the constructor of a class
  • ArrayTypeName::new - reference to the constructor of the specified array type




















Home »
  Java Lambda »
    Java Lambda Tutorial »




Java Lambda Tutorial