Storing an input, and printing out a string depending on the input - Java
<p>I have a problem which I have no idea how to solve. </p>

<pre><code>               thisPizza = pizzaPick.nextInt();

               if((thisPizza &gt; 0) &amp;&amp; (thisPizza &lt; pizza.length))
               {
                orderList[pizzaCount++] = thisPizza;
                sizeMethod();
                System.out.println("\nSubtotal: $" + moneyCounter + "\n");
               }
</code></pre>

<p>Now, what happens in my program, is that it prompts the user to input which pizza they want, and then at the end, it prints it out. It also asks for the size of the pizza... If they input 1, it'll be large, if they input 2, it'll be small... What I need is so that at the end, it prints out the order (Like in this 'for' statement)</p>

<pre><code>    for (int i = 1; i &lt; pizzaCount; i++)
    {
     System.out.println (pizza[orderList[i]]);
    }
</code></pre>

<p>But then also prints out the size of the pizza (i.e. small or large) depending on which size they chose for each pizza.. So if they chose 1, it would be small, and if they chose 2 it would be large... So the final outcome would be something like:</p>

<p>2- Ham - Large</p>

<p>1- Cheese - Small</p>

<p>10- Italian - Small</p>

<p>3- Bacon - Large</p>

<p>5- Vegetarian - Large</p>

<p>I've already got it working to print out the pizzas, I just need it to print out the size of each, next to it. Thanks!!</p>
