Created
March 19, 2014 16:22
-
-
Save koduki/9645374 to your computer and use it in GitHub Desktop.
JDK8 リリース記念
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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