Tag: Character.isDigit
-
How to check whether a number is Disarium or not using stream
This is the second solution to check the number for Disarium. This solution uses IntStream, reduce methods of Stream. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 * 1) + power (5 * 2) + power (1 *3) , the sum of all…
-
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 check whether a number is Armstrong number or not
This is the first solution to check the number for Armstrong. This solution uses String class, and a couple of Character functions to evaluate the sum of the cubes of each digit in a given number. The Armstrong number is say for a given number 153, evaluate the powers of cubes from any side as…
-
How to check whether a number is Disarium or not
This is the first solution to check the number for Disarium. This solution uses String class, and a couple of Character functions to evaluate the sum of powers. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 * 1) + power (5 * 2)…
-
How to find sum of digits in a given float value
This is the second solution to find the sum of digits from a given float value, by using the String and Character methods.
