import java.util.*; import java.util.stream.*; import java.util.function.Function; public class JavaHungry { public static void main(String args[]) { List<Integer> myList = Arrays.asList(10,15,8,49,25,98,98,32,15); myList.stream() .sorted() .forEach(System.out::println); } }
Output:
 8
  10
  15
  15
  25
  32
  49
  98
  98    
Don't miss the next article! 
Be the first to be notified when a new article or Kubernetes experiment is published.                            
