byte b = 127;
String hex = Integer.toHexString(b);
System.out.println(hex);

解决方案 »

  1.   

    先这样 String test=new String(b);
    test.hax...()就是得到16进制。忘了怎么写函数了,你去找下把 H开头就这一两个
    要是String类没有就是Integer.paseInt(test).hax...()一样
      

  2.   

    byte b = 127;
        System.out.println(Integer.toString(b, 16).toUpperCase());
      

  3.   

    byte b = 127;
    String hex = Integer.toHexString(b);
    System.out.println(hex);
                    就ok了!
      

  4.   

    byte b = 127;
    String hex = Integer.toHexString(b);
    System.out.println(hex);
                    就ok了!
    、、、、、、
    大哥,你还有什么高见?难道为了不和你一样,改个System.out(hex);反正也行!
    我可是个菜鸟!