private Set<Role> roles = new HashSet<Role>(0); 解释一上用法
private Set<Role> roles = new HashSet<Role>(0); 解释一上用法
日期:2014-05-20 浏览次数:20719 次
private Set<Role> roles = new HashSet<Role>(0); 解释一下用法? private Set<Role> roles = new HashSet<Role>(0); 解释一下用法?
------解决方案--------------------
------解决方案-------------------- 忘写代码了
Java code
Set<Role> roles = new HashSet<Role>(0);
roles.add("a");
Iterator<Role> i = roles.iterator();
while (i.hasNext()) {
Role r = i.next();
System.out.println(r);
}