diff --git a/Divisibility.java b/Divisibility.java new file mode 100644 index 0000000..65eef46 --- /dev/null +++ b/Divisibility.java @@ -0,0 +1,16 @@ +import java.util.Comparator; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class Divisibility { + + public static void main(String[] args) { + IntStream.range(1, 100) + .boxed() + .filter(num -> num%7 == 0) + .sorted(Comparator.reverseOrder()) + .collect(Collectors.toList()) + .forEach(System.out::println); + } + +}