Java Reference
In-Depth Information
Figure 3.3. Popping a pizza box from the array
tains the string "
Spinach & Rocket
".
The
push()
method appends a new value to the end of the array. This is like Donatello
putting a new pizza box on top of the pile, as shown in
Figure 3.4
. The method returns the
new length of the array:
pizzas.push("Pepperoni");
<< 3
