Category: Length of integer
-
How to find sum of digits in a number
This is the complete solution to find the sum of digits from a given number using the String class, and a few methods. This solution covers all validations. Regular expressions are also used in this solution for validating the given input.
-
How to find length of all integers while giving as input one by one
This is the first solution to find the length of all the integers given during input. This program uses the HashMap collection to store the integer values and it’s respective length as key value pairs.
-
How to find length of integer value using Integer class
This is the third solution to find the length of a given primitive int data type value. This approach uses Integer wrapper class to convert to string before using the length method.
-
How to find length of integer value using String class
This is the second solution to find the length of a given primitive int data type value. This approach converts int value to string, and then applies the length method.
-
How to find length of integer value using core logic
Look at the first solution to find the length of a given integer which is a primitive datatype. This approach is based on the core logic without using any built-in methods.
