Build true iterators in Java using threads. Make your solution as clean and as general as possible.

Question:

Build true iterators in Java using threads. Make your solution as clean and as general as possible. In particular, you should provide the standard Iterator or IE numerable interface, for use with extended for loops, but the programmer should not have to write these. Instead, he or she should write a class with an Iterate method, which should in turn be able to call a Yield method, which you should also provide. Evaluate the cost of your solution. How much more expensive is it than standard Java iterator objects?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: