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

Related questions

0 votes
0 votes
asked Aug 21, 2022 in JAVA by sharadyadav1986
0 votes
asked May 4 in JAVA by rahuljain1
...