What does :: mean in Java?

Yatin B.Yatin B.
1 min read

Date: 2023-01-31

This Java tutorial explains method references (the :: operator), a concise way to refer to methods. It demonstrates four usage scenarios: referencing static methods, instance methods of an object, instance methods of an arbitrary object, and constructors. Method references provide a more compact alternative to lambda expressions. The tutorial includes code examples and assumes Java 8 or later.

Read more: https://examples.javacodegeeks.com/what-does-mean-in-java/

0
Subscribe to my newsletter

Read articles from Yatin B. directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Yatin B.
Yatin B.