Tag: Character.getNumericValue
-
How to find the nth Fibonacci number in the series?
This is the complete solution to find the nth Fibonacci number in the series. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
How to check whether a String is eligible Palindrome or not?
This is the complete solution to check whether a given String is eligible for a Palindrome or not. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
How to check whether a given number is ArmStrong number or not?
This is the complete solution to check whether a given number is ArmStrong number or not. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
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 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 digits in an integer value
This is the second solution to find the sum of digits of an integer value[s]. This solution defines a functional interface with single abstract method with lambda expression. The internal core logic converts an integer value to String, then parse each character to digit, and sums up each digit.
-
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.
