第2个回答 2010-03-18
import java.util.HashSet;
public class windowsTest {
public static void main(String[] args) {
HashSet<String> set = new HashSet<String>();
String s1 = "12345";
String s2 = "23456";
String s3 = s1 + s2;
for(int i = 0; i < s3.length(); i++){
if(!set.add(String.valueOf(s3.charAt(i))))
System.out.print(s3.charAt(i));
}
}
}本回答被网友采纳