Question: Your program should be in a new project named Program 1: Initials and should be in a package named initials. Your program must be in
Your program should be in a new project named "Program 1: Initials" and should be in a package named "initials". Your program must be in a file called "Program1Initials". Write a Java program that will:
- Create a new array of Strings named strings with the following line of code:
- String[] strings = {"Clement Tegha Hurbrough", "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 "[Clement Tegha Hurbrough]"
- Output "Your first name is [Clement] with a length of [7]"
- Output "Your middle name is [Tegha] with a length of [5]"
- Output "Your last name is [Hurbrough] with a length of [9]"
- Output "Your initials are [CTH]. The length of your entire name is [15]"
- Output "A random sequence of 5 letters in your name is "[Tegha]""
- Output two blank lines to separate the name being processed from the next name being processed
- The following goes in the loop:
Items in brackets will change with each iteration of the loop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
