In Java 8 - count number of elements in IntStream










Program/ Example -
    //In Java 8 - count number of elements in IntStream
       long count = IntStream.of(9, 5, 3, 12, 4).count();
       System.out.println("count = "+count);


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.





eEdit
Must read for you :