This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iterator

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It compiles and execute perfectly without any output.

Why doesn't it throw any Exception ? neither iterator() nor hasNext() have any problem ?
 
Stephan van Hulst
Bartender
Pie
Posts: 4840
34
Chrome Netbeans IDE Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you think myList is null? What makes you think iterator is null?
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic