Core concept
Function sq = n -> n * n;
Runnable r = () -> System.out.println("hi"); Advertisement
How it works
Captured vars must be effectively final.
Advertisement
Trade-offs + gotchas
Callbacks + strategy patterns.
Function sq = n -> n * n;
Runnable r = () -> System.out.println("hi"); Captured vars must be effectively final.
Callbacks + strategy patterns.