```
package nilpointer.net;
import java.util.ArrayList;
import java.util.List;
public class Demo {
public static void main(String[] args) {
List<Integer> numbers = new ArrayList<Integer>();
numbers.add(5);
numbers.add(2);
numbers.add(11);
numbers.add(-9);
numbers.add(7);
numbers.add(-4);
System.out.println("Ascending Order");
numbers.stream().sorted((number1, number2) -> number1 - number2).forEach(number -> {
System.out.print(number + " ");
});
System.out.println("\nDescending Order");
numbers.stream().sorted((number1, number2) -> number2 - number1).forEach(number -> {
System.out.print(number + " ");
});
System.out.println("\nSort with Condition");
numbers.stream().filter(p -> p > 0).sorted((number1, number2) -> number2 - number1).forEach(number -> {
System.out.print(number + " ");
});
}
}
```

```
Ascending Order
-9 -4 2 5 7 11
Descending Order
11 7 5 2 -4 -9
Sort with Condition
11 7 5 2
```