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:

  1. Create a new array of Strings named strings with the following line of code:
    1. String[] strings = {"Clement Tegha Hurbrough", "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 "[Clement Tegha Hurbrough]"
    2. Output "Your first name is [Clement] with a length of [7]"
    3. Output "Your middle name is [Tegha] with a length of [5]"
    4. Output "Your last name is [Hurbrough] with a length of [9]"
    5. Output "Your initials are [CTH]. The length of your entire name is [15]"
    6. Output "A random sequence of 5 letters in your name is "[Tegha]""
    7. Output two blank lines to separate the name being processed from the next name being processed

Items in brackets will change with each iteration of the loop.

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!