Sequential Loops

From CSE231 Wiki
Revision as of 02:16, 20 November 2022 by Cosgroved (talk | contribs) (→‎While Loop With Iterator)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

For Each Loop

Many of the methods in this class are well served by using the for-each loop.

For Index Loop

The constructor should choose the for index loop to do its required array initialization.

While Loop With Iterator

Methods such as LinkedList remove should choose a while loop combined with iterator.remove()