File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Display the data in List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Display the data in List" Watch "Display the data in List" New topic

Display the data in List

Chen ZhiJiang
Ranch Hand

Joined: May 18, 2002
Posts: 72
Dear All:
I have one basis problem:
I have a LIST contact some data, i display it use:
Iterator a=ListData.Iterator();
System.out.pritnln("Data: "+a.toString();
But how i can loop this iterator again. when i try to loop it again, the error shows i have reach the end of collection, how i can do loop again or using other methods.
Thanks in advanced.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32301

You would write the following statement again.

It's important to keep access to listData (the real data) because you need it to get a fresh iterator.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Display the data in List
jQuery in Action, 3rd edition