約 13,300,000 件の結果
リンクを新しいタブで開く
  1. What are iterator, iterable, and iteration? - Stack Overflow

    Iterator: Iterator are the object which call next method and transverse through the sequence. On calling the next method it returns the object that it traversed currently.

  2. java - What is the difference between iterator and iterable and how to ...

    2011年7月28日 · Iterator is class that manages iteration over an Iterable. It maintains a state of where we are in the current iteration, and knows what the next element is and how to get it.

  3. Which is more efficient, a for-each loop, or an iterator?

    Iterator is an interface in the Java Collections framework that provides methods to traverse or iterate over a collection. Both iterator and for loop acts similar when your motive is to just traverse over a …

  4. Difference between Iterator and Spliterator in Java8

    2018年7月21日 · I came to know while studying that Parallelism is a main advantage of Spliterator. This may be a basic question but can anyone explain me the main differences between Iterator and …

  5. java - Iterator vs for - Stack Overflow

    2014年3月8日 · I was asked in an interview what is the advantage of using iterator over for loop or what is the advantage of using for loop over iterator? Can any body please answer this?

  6. How to correctly implement custom iterators and const_iterators?

    2010年8月27日 · The reverse iterator is work for nothing, since the standard library provides a reverse-iterator adapter. And you failed to make the iterator type assignable from the const iterator.

  7. Difference between Python's Generators and Iterators

    What is the difference between iterators and generators? Some examples for when you would use each case would be helpful.

  8. Incrementing iterators: Is ++it more efficient than it++?

    2018年10月26日 · The reason is that if the iterator class itself is at all complex, then because it++ has to return the value before it is incremented, the implementation will generally make a copy. Vector …

  9. How does next() method on iterators work? - Stack Overflow

    2017年12月6日 · At the very first iteration, the iterator starts pointing to element with index 0? or like the "index -1" ? I ask because as far as I know the next() method returns the next element in the collection.

  10. What does the "yield" keyword do in Python? - Stack Overflow

    2008年10月24日 · An iterable returns an iterator upon calling the iter () on the iterable, and an iterator doesn't always have to store its values in memory, depending on the implementation of the iter …