Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.44 KB

learning_java_lambdas.md

File metadata and controls

58 lines (38 loc) · 1.44 KB
path title
/learnings/java_lambdas
Learnings: Java: Lambdas

Table Of Contents

<<Learning_Java_Lambdas>>

Useful interfaces:

Restrictions:

<<Java_Lambda_Outside_Variable_Restrictions>>

  1. Variables used in lambda must be final or effectively final - no reassigning values / no __block syntax

<<Learning_Java_Lambdas_Single_Abstract_Interface>>

If you have some Java code like so

interface ThisCallable {
    void doIt(int c);
}


class Example {
    void higherOrderFunction(ThisCallable x) {
    ...
    }
}

Since ThisCallable is a Java Single Abstract Method Interface Java 8+ - will figure it out if you just pass a lambda (in either language)

Book Recommendations