0 votes
in JAVA by
What are different kinds of Method References?

1 Answer

0 votes
by
There are four kinds of method references:

Reference to a static method. For example:

ContainingClass::staticMethodName

Reference to an instance method of a particular object. For example:

containingObject::instanceMethodName

Reference to an instance method of an arbitrary object of a particular type. For example:

ContainingType::methodName

Reference to a constructor. for example:

ClassName::new
...