aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Display the data in List" Watch "Display the data in List" New topic
Author

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();
while(a.hasNext())
{
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.
ZhiJIang


SCJP SCEA-I
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

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.


[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: http://aspose.com/file-tools
 
subject: Display the data in List