Why can’t String::charAt be used as a method reference?
A. Method references can only be used on static methods.
B. Method references can pass either the instance or the parameter from the lambda, but not both.
C. The charAt() method takes an int rather than Integer parameter.
D. There is no charAt() method in the String class.
Answer, according to Answers to Review Questions:
B. ... With method references, only one item can be supplied at runtime. Here, we need either a String instance with no parameters in the method or a static method with a single parameter. The charAt() method is an instance method with a single parameter so does not meet this requirement.
Correct answer: it can be used as a method reference: