Skip to content

Instantly share code, notes, and snippets.

@Shamrock-Frost
Created February 25, 2016 06:48
Show Gist options
  • Save Shamrock-Frost/29434f80af1f4b24a4c9 to your computer and use it in GitHub Desktop.
Save Shamrock-Frost/29434f80af1f4b24a4c9 to your computer and use it in GitHub Desktop.
@FunctionalInterface
interface Test {
public abstract void doThing();
}
//Place where code would be run
List<Test> tests = new ArrayList();
tests.add(() -> System.out.println("1"));
tests.add(() -> System.out.println("2"));
tests.add(() -> System.out.println("3"));
tests.add(() -> System.out.println("4"));
for(Test t : tests) t.doThing();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment