subject

In main: Declare an array capable of holding five Strings.
Populate the array by entering five first names all on one one line separated by spaces (see sample output but use different names).
Use a foreach loop (see page 255) to process the array and display the names on one line separated by spaces.
Pass the array to a void method.
In the void method:

Sort the array.
Create an arraylist of Strings.
Use a loop to populate the arraylist with the Strings in the array that was passed it.
Insert another name (you choose it) at the start of the arraylist.
Remove the name at the end of the arraylist.
Use a foreach loop to process the arraylist and display the names on one one line separated by spaces.
Sample Output (user input in boldface)
Enter five first names
Penny Lenny Benny Denny Kenny
Sorted array of names
Benny Denny Kenny Lenny Penny
Final list of names
Maria Benny Denny Kenny Lenny

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
You know the right answer?
In main: Declare an array capable of holding five Strings.
Populate the array by entering fiv...
Questions
question
Mathematics, 19.02.2022 05:40
question
Mathematics, 19.02.2022 05:40
question
Mathematics, 19.02.2022 05:40
question
Mathematics, 19.02.2022 05:50
question
Mathematics, 19.02.2022 06:00
Questions on the website: 13722367