Simple question about java-8
syntax. Why does JLS-8
restrict such expressions like:
Object of_ref = Stream::of; // compile-time error
and allow only something like:
java.util.function.Function of_ref = Stream::of;
Object obj = of_ref; // compiles ok
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…