java吧 关注:1,237,855贴子:12,707,482
  • 5回复贴,共1
最近在自学求教这个题目


IP属地:广西来自Android客户端1楼2014-11-05 15:08回复
    String a = "1你号";
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < a.length(); i++) {
    if ((a.charAt(i) + "").getBytes().length != 1) {
    sb.append(a.charAt(i));
    }
    }
    System.out.println(sb.toString());


    IP属地:广东2楼2014-11-05 15:21
    收起回复