Skip to content

Instantly share code, notes, and snippets.

@skylerto
Created February 12, 2016 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylerto/823cbff8f2cdaf936418 to your computer and use it in GitHub Desktop.
Save skylerto/823cbff8f2cdaf936418 to your computer and use it in GitHub Desktop.
import java.util.*;
public class Test {
public static void main(String[] args){
List<Integer> numbers = Arrays.asList(1,2,3,4,5);
/* Lambda Functions, figures out the type */
// numbers.forEach((val) -> {
// System.out.println(val);
// });
/* Method references */
numbers.forEach(System.out::println);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment