Question: How to write this Code in Java without the Split? Create a new array of Strings named strings with the following line of code: String[]

How to write this Code in Java without the Split?

  1. Create a new array of Strings named strings with the following line of code:
    1. String[] strings = {"David Lee Alger", "Kate Garry Hudson", "Tina Stamatina Fey", "Hugh Mungo Grant", "Uma Karuna Thurman"};
  2. Creates a for loop to step through the array with the following form "for (int i=0;i
  3. The following goes in the loop:
    1. Set a new String variable named currentName to "[David Lee Alger]"
    2. Output "Your first name is [David] with a length of [5]"
    3. Output "Your middle name is [Lee] with a length of [3]"
    4. Output "Your last name is [Alger] with a length of [5]"
    5. Output "Your initials are [DLA]. The length of your entire name is [15]"
    6. Output "A random sequence of 5 letters in your name is "[d Lee A]""
    7. Output two blank lines to separate the name being processed from the next name being processed

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!