Iterating through an ArrayList is a simple operation. We may use a for loop for that or an Iterator.
Can we use Enumeration for this purpose as well? If yes, please give a sample.Code:Iterator<String> it = arrayList.iterator();
Thanks.
- PEACE
Printable View
Iterating through an ArrayList is a simple operation. We may use a for loop for that or an Iterator.
Can we use Enumeration for this purpose as well? If yes, please give a sample.Code:Iterator<String> it = arrayList.iterator();
Thanks.
- PEACE