Java Program for user String input.1 min read

Output: