Skip to content

Reference class to remind me how Lambdas work in Java

Notifications You must be signed in to change notification settings

ch4dwick/JavaLambdaTest

Repository files navigation

LambdaTest

I kept forgetting how to implment the darn things or how it worked so I just put this up here to remind me.

This is a reference class to remind me how Lambdas work in Java. The usual wordy docs from Oracle didn't help me understand it any better.

App.java - implments three diffent ways of using Lambda

  1. Via inline anonymous class
  2. Pass by reference with two different variations.
  3. Show that threads can do it too!

It doesn't look like much but I've seen how simpler the codes were especially when you only needed to implment one inline method of an interface. I saw how cleaner it looked one time when I tried to port an old Java Spark project to use this.

About

Reference class to remind me how Lambdas work in Java

Resources

Stars

Watchers

Forks

Languages