Method references in Java

String::valueOf

called method references and are handles for static methods in the Class. Just like lambdas, it is an alternative way of representing a function type by a concrete method

But it can also be used to refer to a class’s bound and unbound non-static methods, and constructors. You can also use method references to refer to instance methods in superclass and current class types.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at WordPress.com
Get started
%d bloggers like this: