This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Past Paper question

 
Steven Gibbs
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there. I am currently studying for an exam for a module I do at uni called Algorithms and Data Structures. I am looking at a past paper and I'm stuck on a question and wondered if anyone could help? The question is below:

The following java code fragment illustrates the use of an iterator object to traverse the members of a set of strings:



Explain how this code works by describing each of the operations used. Explain why the typecast is needed in line 3 of this code fragment.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you take the Collections tutorial, such questions will be a piece of cake: http://java.sun.com/docs/books/tutorial/collections/index.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic