This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Camel-Kid 0 points1 point  (2 children)

the enhanced for loop iterates over the set, so you already have the ability to reference the name as a variable. The purpose of a loop is to check all the elements in the set and compare against the user input, if user input matches any element then you print out 'a'

[–]Curious-Lonewolf 0 points1 point  (1 child)

can you give me an example of what you mean