public static void main(String[] args) {
        // TODO Auto-generated method stub
        String a = "\001";
        if("\001".equals(a)){
            a = "001";
            int b = Integer.valueOf(a);
            //转为ascii
            char c = (char)b;
            //转为String
            String d = String.valueOf(c);
            System.out.println(">>>>>>c:"+c);
            System.out.println(">>>>>>d:"+d);
        }
    }

输出结果:

>>>>>>c:
>>>>>>d:

 

相关文章:

  • 2022-01-25
  • 2021-11-14
  • 2022-12-23
  • 2021-11-21
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
相关资源
相似解决方案