ERROR - println cannot be resolved or is not a field


println cannot be resolved or is not a field 

Error Type

Compile Time

Sample Code 

intList.forEach(System.out.println); // Java8




No input has been provided to the println method. Java 8 allows specifying double column operator like 

intList.forEach(System.out::println); within Lambda Expressions.

You might have missed double semicolon and specified println in the conventional way.

Possible Resolution

Specify the input to the println method or Specify the semicolon if you are working with Lambda expressions within Java 8.