| 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: 26192
|
|
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
|
 |
 |
|
|
subject: Display the data in List
|
|
|