terry dhariwal

Greenhorn
+ Follow
since Aug 10, 2015
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by terry dhariwal

In this code, the method setFilters is expecting a List of Functional Interfaces (Function<Color,Color> filters).

I don't understand how the code compiles successfully because in the main method we are calling setFilters with a method-reference argument (Color::brighter, Color::darker) which expects a list of Functional interfaces. However Color is not a functional interface.

Can anyone clarify how this works?