public void test7(){
String s = "我我....我...我.要...要要...要学....学学..学.编..编编.编.程.程.程..程";
StringBuffer sb = new StringBuffer();
int len = s.length();
int i = 0;
boolean flag = false;
for (i = 0; i < len; i++) {
char c = s.charAt(i);
if (s.indexOf(c) != s.lastIndexOf(c)) {
flag = false;
}else{
flag = true;
}
if(i==s.indexOf(c))
flag=true;
if (flag) {
sb.append(c);
}
}
sb.deleteCharAt(1);
System.out.print(sb.toString());