Program/ Example -
//In Java 8 - Find maximum of all numbers in IntStream
OptionalInt max = IntStream.of(9, 5, 3, 12, 4).max();
System.out.println("max = "+max.getAsInt());
Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.