Skip to content

Instantly share code, notes, and snippets.

@morishjs
Created July 21, 2016 02:56
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 morishjs/3fc3dd15d11bc5877009b51f0b46ca56 to your computer and use it in GitHub Desktop.
Save morishjs/3fc3dd15d11bc5877009b51f0b46ca56 to your computer and use it in GitHub Desktop.
public class StreamExercise {
public static void main(String[] args) {
// TODO Auto-generated method stub
String[] strings = {"d2", "a2", "b1", "b3", "c"};
Arrays.asList(strings).stream().filter(x->{
return x.startsWith("a");
}
).forEach(x-> System.out.println(x));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment