A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Iterator in TestNG class
Joined: Jun 08, 2011
Jun 08, 2011 15:30:00
If a class implements iterator interface, it provides next() and hasnext(). Do these next() and hasnext() get called automatically when the class's object is created?
author & internet detective
Joined: May 26, 2003
Jun 08, 2011 21:02:51
Welcome to CodeRanch!
No. next() and hasNext() are not called automatically on an iterator.
OCA 8 book
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Iterator in TestNG class
Q about ArrayList/LinkedList
Why is this hashmap iterating through an infinite loop?
My LinkedList Iterator - Can't print first element - No use of Java API
Please help me understand Iterator - I am a beginner and I did a reserch but I didn't find an answer
Rant about java Iterator interface
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015