public class Test{
public static void main(String[] args){
String str = "sdswe我是是倒萨";
int num = 0;
String array = "";
for(int i = 0;i<str.length();i++){
char ch = str.charAt(i);
if((ch+"").getBytes().length == 2){
array += ch;
}
}
System.out.println(array);
char[] a = array.toCharArray();
System.out.println(a);
}
}
温馨提示:内容为网友见解,仅供参考