Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
private void exercise3() {
List<String> list = Arrays.asList(
"The", "Quick", "BROWN", "Fox", "Jumped", "Over", "The", "LAZY", "DOG");
String string =
list
.stream()
.skip(1)
.limit(3)
.collect(Collectors.joining("-"));
System.out.println(string);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment