Category: Length
-
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 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 find length of alpha numeric value or string
This is the second solution to find the length of an alpha numeric or string value, using functional interface and lambda expression without return statement. This approach uses direct String class length method.
-
How to find length of long integer value using String class
This is the second solution to find the length of a given long integer value with help of functional interface and lambda expression. The internal logic is same that is converting long to string, and apply length method.
-
How to find the minimum and maximum length strings in a sentence of strings using HashMap
This is the second solution to find the maximum length and minimum length strings from a given input sentence of strings, using the HashMap methods.
-
How to find the minimum and maximum length strings in a sentence of strings
This is the first solution to find the maximum and minimum length strings from a given input sentence of strings, using the core logic.
-
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 alpha numeric value or string
This is the first solution to find the length of a given alpha numeric or string value. This approach uses direct string class length method.
-
How to find length of double value using Double class
This is the second solution to find the length of a given double value. This approach uses Double wrapper class to convert to string before using the length method.
