Understand the compile time error with Method Reference
问题 As per the Documentation, Method Reference is absolutely not a static call. It works on both static and non- static methods. When we define our own non-static method in a given class and try to use it using Method Reference then the compile-time-error "cannot make static reference to non static method" is NOT seen in case of Function but only seen in case of Supplier, Consumer and Predicate. Why is that so? class Demo{ private Function<Student, Integer> p= Student::getGradeLevel; // fine