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?
- Create a new array of Strings named strings with the following line of code:
- String[] strings = {"David Lee Alger", "Kate Garry Hudson", "Tina Stamatina Fey", "Hugh Mungo Grant", "Uma Karuna Thurman"};
- Creates a for loop to step through the array with the following form "for (int i=0;i
- The following goes in the loop:
- Set a new String variable named currentName to "[David Lee Alger]"
- Output "Your first name is [David] with a length of [5]"
- Output "Your middle name is [Lee] with a length of [3]"
- Output "Your last name is [Alger] with a length of [5]"
- Output "Your initials are [DLA]. The length of your entire name is [15]"
- Output "A random sequence of 5 letters in your name is "[d Lee A]""
- Output two blank lines to separate the name being processed from the next name being processed
- The following goes in the loop:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
