Tag: stream
-
How to check whether a given integer is prime number or not ?
This is the complete solution to check whether a given integer number is prime or not. This solution is designed to to solve the problem using an interface, super class and four derived classes implementing the interface. The core logic is to check the divisibility of the given number, from 2 to till the square…
-
How to reverse all the numbers in an array of integers using stream
This is the third solution to reverse all the numbers in the given array. This solution uses IntStream, range and map methods.
-
How to find the minimum and maximum length strings in a sentence of strings using stream
This is the third solution to find the maximum and minimum length strings from a given input sentence of strings, using the reduce() methods of stream.
-
How to move zero’s to end in an array List of integers using streams
This is the third solution to move all Zero numbers to the end of an arrayList. This solution uses filter(), map() methods of stream. The resultant arrayList has all the exists zero’s moved to end.
-
How to find Nth largest number in an array list using streams
This is the fourth solution to find the Nth largest number from an array list of given integers or doubles or strings. This program uses the sorted(), and collectors() methods of stream.
