ron said:
How do I use the Boolean isEmpty test on an array list. While in a 'while
loop' ie continue till list is empty?
The name of the array list is pList.
Thanks for your help
Don't they teach programming at your school any more? Here is the
skeleton of the code you need to use.
do {
doMagicStuff(pList);
} while (!pList.isEmpty());
Note that if doMagicStuff() does not alter the contents of pList, then
your loop will run either exactly once, or perpetually. This is because
do...while loops themselves cannot change the state of ArrayLists.
--
/-- Joona Palaste (
[email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
|
http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"C++ looks like line noise."
- Fred L. Baube III