Anonymous function: Difference between revisions

Content deleted Content added
Names: Changed a slightly confusing use of parentheses.
Differences to Anonymous Classes: "different from" not "different to"
Line 1,048:
In the example above, the functional interface <code>IntBinaryOperator</code> declares an abstract method <code>int applyAsInt(int, int)</code>, so the compiler looks for a method <code>int sum(int, int)</code> in the class <code>java.lang.Integer</code>.
 
==== Differences compared to Anonymous Classes ====
 
[https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html Anonymous classes] of lambda-compatible interfaces are similar, but not exactly equivalent, to lambda expressions.