Tag: stream
-
How to find sum of digits in a number using stream
This is the third solution to find the sum of digits of an integer value[s]. This solution uses the map(), and reduce() methods of Arrays stream.
-
How to reverse each word in a given sentence
This is the fourth solution to reverse each word of given line of strings. This program uses the map() method of java stream, and reverse() method of StringBuffer.
-
How to check whether a number is Armstrong number or not
This is the third solution to check whether a given number is Armstrong number or not. This program uses the map() and reduce() methods of java streams.
-
How to find sum of digits in an alpha numeric value
This is the third solution to find sum of integers in a given alphanumeric string. This program uses the filter(), map() and reduce() methods of java streams.
-
How to find sum of integers in an array List
This is the third solution to find sum of integers in an array list. This program uses the reduce() method of java streams.
-
How to move all Zero numbers to end in an array of integers
This is the first solution to move all Zero numbers to the end of an array of integers. This solution modifies the same array with all non-zero numbers moving left, and Zero numbers moved to the end.
-
How to count whether any number in an array repeated twice or thrice
This is the second solution to count whether any of the number in an array repeated twice or thrice from the same array of integers using Collections class.
-
How to find biggest number in an array of integers using streams
This is the third solution to find the biggest number from the given array of integers, using stream method of Arrays class. This stream uses filter(0, max(), and getAsInt() methods.
