title: Pizza toppings with array
body: <p>I'm suppose to write a program, Pizza.java, that lets the user enter up to 15 toppings for a pizza, then prints out the toppings in alphabetical order. Also, the toppings should be listed with numbers. </p>
  
  <p>A sample output would be like this</p>
  
  <p><a href="https://i.stack.imgur.com/6RN58.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RN58.png" alt="A sample output would be like this"></a></p>
  
  <p>The code I wrote is as follows:</p>
  
  <pre><code>import java.util.*;
   public class Pizza {
   public static final int numbers=15;
  
    public static void main(String[] args) {
  
  
    Scanner input = new Scanner(System.in);
  
    String []toppings;
    System.out.println("Enter a toping (or type quit): ");
  
    String a= input.nextLine();
  
   // how do I add String a to the array toppings?   
    int count=1;
    while (!a.equals("quit")&amp;&amp;count&lt;numbers){
       System.out.println("Enter a topping (or type quit): ");
       a= input.nextLine();
       if(!a.equals("quit"))
          // how do I add String a to the array toppings?     
       count++;
  
  
    }
      if(count==numbers)
       System.out.println("No more toppings allowed.");
       int i=1;
       Arrays.sort(toppings); //sorts the array in alphabetical order
      while (int i&lt;=count){
    System.out.println(i+". "+Arrays.toString(toppings));      
    }
  
       if(a.equals("quit")){
        Arrays.sort(toppings); //sorts the array in alphabetical order
  
        while (int j&lt;=count){
        System.out.println(j+". "+Arrays.toString(toppings));      
         }
    }
  
  
  
  
  
  
          }
  
  
  
           }
  </code></pre>
  
  <p>How do I complete this code?
  Any help would be appreciated</p>