摘要:
1 Set s1=new HashSet(); 2 Set s2=new HashSet(); 3 s1.add("a"); 4 s1.add("b"); 5 s1.add("c"); 6 s2.add("d"); 7 s2.add("a"); 8 s2.add("b"); 9 Set sn=new HashSet(s1);10 sn.retainAll(s2);11 Set su=new HashSet(s1);12... 阅读全文
摘要:
1 import java.util.*; 2 3 class Name 4 { 5 private String firstName,lastName; 6 7 public String getFirstName() { 8 return firstName; 9 }10 11 public void setFirstName(String firstName) {12 this.firstName = firstName;13 }14 15 public String getLastName()... 阅读全文