As you hopefully know you can use lambdas in Java 8, for example to replace anonymous methods.
An example can be seen here of Java 7 vs Java 8:
Runna
To complete Marko Topolnik's answer about Timer, you just have to call schedule method with a lambda.
Timer
schedule
schedule(() -> { System.out.println("Task #1 is running"); }, 500);