HashSet的contains方法 contains方法用来判断Set集合是否包含指定的对象。 语法 boolean contains(Object o) 返回值:如果Set集合包含指定的对象,则返回true;否则返回false。