Labs

Sets can only contain unique elements. In these labs we will examine and use this feature.

  1. The file names.txt at the root of the SetInterface project contains many names. Create a program to:
  2. Add each name to a List.
  3. Add each name to a Set.
  4. Display the size of the List, the size of the Set, and the number of lines in the names.txt file.

(Solution: NameApp.java)


Prev -- Up