Person person=new Person();
TreeSet set3=(TreeSet) person.getSet3();
System.out.println(set3);
结果: java.lang.ClassCastException: java.util.HashSet cannot be cast to java.util.TreeSet
at cn.itcast.problem.CollectionMapTest.main(CollectionMapTest.java:14)