Skip to content

Instantly share code, notes, and snippets.

@hoangbits
Created September 29, 2022 03:12
Show Gist options
  • Save hoangbits/1a6f8aabc8a31f672a743484e3d29cf3 to your computer and use it in GitHub Desktop.
Save hoangbits/1a6f8aabc8a31f672a743484e3d29cf3 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
import java.util.List;
class Main {
public static void main(String[] args) {
// Creating a list of Integers
List<Integer> list = Arrays.asList(3, 4, 6, 12, 20);
list.stream()
.filter(num -> true)
.forEach(System.out::println);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment