Tag: split
-
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 sum of digits in an alpha numeric value
This is the first complete solution to find the sum of digits from a given alpha numeric value by mainly using String and Character class methods along with regular expressions and exceptions.
-
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 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 count number of occurrences of a given word in a file
This is the second solution to count the number of occurrences of a given string in the file. This approach uses the FileReader, Scanner, and String class methods.
