0
Explain the System.out::println expression.

Open 1 Answers 24 Views Education

Explain the System.out::println expression.

1 Answer

0

What are method references in Java8?

Method references help to point to methods by their names. A method reference is described using :: (double colon) symbol. A method reference can be used to point the following types of methods -

Static methods

Instance methods

Constructors using new operator (TreeSet::new)

Explain the System.out::println expression.

System.out::println method is a static method reference to println method of out object of System class.

by (53.7k points)
...