//BookCollection.java

import java.util.HashSet;

public class BookCollection
{
    public static void main(String[] args)
    {
        HashSet<String> ownedBooks = new HashSet<String>();

        ownedBooks.add("A Tale of Two Cities");
        ownedBooks.add("The Lord of the Rings");

        System.out.println
        (
            "Contains \"A Tale of Two Cities\": "
            + ownedBooks.contains("A Tale of Two Cities")
        );

        ownedBooks.remove("The Lord of the Rings");

        System.out.println
        (
            "Contains \"The Lord of the Rings\": "
            + ownedBooks.contains("The Lord of the Rings")
        );
    }
}

