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:

  1. check for palindrome (returns true or false)
  2. get the word counts
  3. get the character counts
  4. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!