subject
Computers and Technology, 16.10.2020 06:01 1129682

1 // Application contains a starting list of three products for sale2 // The user is prompted for additional items3 // After each new entry, the alphabetically sorted list is displayed4 import java. util.*;5 public class DebugNine36 {7 public static void main(String[] args)8 {9 ArrayListproducts = new ArrayList();10 products. add(shampoo);11 products. add(moisturizer);12 products. add(conditioner);13 Collections. sort(products);14 display(products);15 final String QUIT = "quit";16 String entry;17 Scanner input = new Scanner(System. in);18 System. out. print("\nEnter a product or " + QUIT + " to quit >> ");19 entry = input. nextLine();20 while(entry. equals("quit"))21 {22 products. add(entry);23 Collections. sort(products);24 display()25 System. out. print("\nEnter a product or " + QUIT + " to quit >> ");26 entry = input. nextLine();27 }28 public static void display(ArrayList products)29 {30 System. out. println("\nThe size of the list is " + products. size());31 for(int x = 0; x == products. size(); ++x)32 System. out. println(products. get(x));33 }34 }35//Debugging Exercises, Chapter 9;Java Programming, Joyce Farraell, 8th

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
In outlook how can cherie look at the details of an event that appears on the month view of her calendar? check all that apply. by switching to the detail view by switching to the week view by switching to the day view by right-clicking on the event by double-clicking on the event by highlighting the event
Answers: 2
question
Computers and Technology, 22.06.2019 09:00
Meenu wants to create a high quality drawing in a variety of colours. which device should she use for the same?
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
You know the right answer?
1 // Application contains a starting list of three products for sale2 // The user is prompted for ad...
Questions
question
Mathematics, 28.07.2021 22:40
question
Health, 28.07.2021 22:40
question
Mathematics, 28.07.2021 22:40
Questions on the website: 13722363