Question: Write a java program (for example stringDemo.java) to create an array of 4 stringDemo objects. Get a line of string from the user as input.
Write a java program (for example stringDemo.java) to create an array of 4 stringDemo objects. Get a line of string from the user as input. Then create 4 methods in the same program for accomplishing the following tasks:
- check for palindrome (returns true or false)
- get the word counts
- get the character counts
- get the total digits counts
Then call the four methods using four objects in an array (one object for one method) by taking line of string as input and display the results
Please send me a detailed working code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
