Tag: Scanner
-
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 find factorial of a number using Stream
This is the fifth solution to find the factorial of a number using Stream. This program uses the LongStream, range(), reduce() methods.
-
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.
-
How to find and replace a given string with new string in a file
This is the second solution to find and replace a given string with a new string in a file. This approach uses the FileReader, Scanner, FileWriter, BufferedWriter, and String methods.
-
How to check a string can be eligible to form a palindrome
This is the third solution to check whether a string can be formed as a palindrome. This approach uses the eliminating the repeated characters from the input string using the String Buffer class.
-
How to check a string can be eligible to form a palindrome
This is the second solution to check whether a string can be formed as a palindrome. This approach uses the eliminating the repeated characters from the input string using the Hash map collection.
