The question may appear stupid to most but its an important and major concern for a person like me:
or:Code:Iterator it = myList.iterator(); while(it.hasNext()) { }
I wrote the second way, but two of my bosses tell me it's wrong, without giving any proper reason. So here arises a big argument for me: which is proper and best to implement an iterator "for" or "while"?Code:for(Iterator it = myList.iterator(); it.hasNext(); ) { }
Bookmarks