jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Iterator" Watch "Iterator" New topic
Author

Iterator

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


It compiles and execute perfectly without any output.

Why doesn't it throw any Exception ? neither iterator() nor hasNext() have any problem ?


My one regret in life is that I am not someone else.
- Woody Allen
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4003
    
  18

What makes you think myList is null? What makes you think iterator is null?


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Stephan van Hulst wrote:What makes you think myList is null? What makes you think iterator is null?


Sorry that is not null but empty.I did never iterate empty collection so got confused.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Iterator
 
jQuery in Action, 3rd edition