1String str="a你b好";
2
3 byte chars[]=str.getBytes();
4
5 String ss="";
6
7 byte temp[]=new byte[2];
8
9 for(int i=0,count=0;i<chars.length;i++){
10
11 if(chars[i]<0){
12 temp[count]=chars[i];
13
14 count++;
15
16 if(count%2==0){
17 ss+=new String(temp);
18
19 count=0;
20 }
21 }
22 }
23
24 System.out.println(ss);