Skip to content

Instantly share code, notes, and snippets.

@rayjcwu
Created January 20, 2014 06:49
Show Gist options
  • Save rayjcwu/8516032 to your computer and use it in GitHub Desktop.
Save rayjcwu/8516032 to your computer and use it in GitHub Desktop.
The code above expects a group of objects to print. Which of the following is a valid replacement type of XXX shown. 1. java.io.Reader 2. java.lang.Enum 3. java.lang.Iterable 4. java.util.Map
void printEach (XXX items) {
for (Object o: items) {
System.out.println(o);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment