Compare and contrast the break and continue statements.
What will be an ideal response?
The break statement terminates a switch or a loop immediately. The continue statement terminates the current iteration of a loop and moves to the next iteration.
You might also like to view...
A picture from a file is inserted into a document ________
A) at the beginning B) at the bottom C) in the paragraph containing the insertion point D) before the paragraph containing the insertion point
Write out the order of elements that are contained in a queue after the following operations are performed.
What will be an ideal response? ``` myQueue.enqueue(new Integer(8)); myQueue.enqueue(new Integer(6)); Integer num1 = myQueue.dequeue(); myQueue.enqueue(new Integer(3)); myQueue.enqueue(new Integer(4)); myQueue.enqueue(new Integer(15)); myQueue.enqueue(new Integer(12)); myQueue.enqueue(new Integer(9)); myQueue.dequeue(); myQueue.dequeue(); myQueue.dequeue(); myQueue.enqueue(new Integer(19)); ```