Java Reference
In-Depth Information
Figure 3.4. Pushing a pizza box onto our array
The shift() method works in a similar way to the pop() method, but this removes the
first item in the array. This is like Donatello removing a pizza box from the bottom of his
stack of boxes, as shown in Figure 3.5 :
pizzas.shift();
<< "Margherita"
Figure 3.5. Using shift() on our array
Search WWH ::




Custom Search