Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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