how to print minimum and maximum using stream java code example Example: java int stream min list.stream().min(Integer::compare).get()