本帖最后由 艮昕辶 于 2014-5-21 16:44 编辑
- package test;
- import java.util.HashSet;
- public class Demo1636 {
- public static void main(String[]args){
- HashSet hs=new HashSet();
- hs.add(new Integer(1));
- hs.add(new Integer(11));
- HashSet<String>hs_String=hs;
- System.out.println(hs_String);
-
- for(String str:hs_String){
- System.out.println(str.length());
- }
-
- }
- }
复制代码 |