wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread - TreeSet Iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread - TreeSet Iterator" Watch "Thread - TreeSet Iterator" New topic
Author

Thread - TreeSet Iterator

Sangita Mishra
Greenhorn

Joined: Jun 15, 2005
Posts: 22


It's giving compile error. Can somebody please tell me what would be the exact metoh of TreeSet iterator in this case?
[ June 26, 2005: Message edited by: Sangita Mishra ]
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
The TreeSet class does not have a method 'next', you need to call the method 'next' on the Iterator object. Check the API at,
TreeSet API

You need to make the following change for our code to compile, and show meangingful results,
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Thread - TreeSet Iterator