Skip to content

Instantly share code, notes, and snippets.

@koduki
Created March 19, 2014 16:22
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 koduki/9645374 to your computer and use it in GitHub Desktop.
Save koduki/9645374 to your computer and use it in GitHub Desktop.
JDK8 リリース記念
import java.util.Arrays;
import java.util.List;
/**
*
* @author koduki
*/
public class HelloJDK8 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
List<String> names = Arrays.asList("foo", "bar", "hoge", " scott/tiger");
names.stream()
.map(x -> "[" + x + "]")
.forEach(System.out::println);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment