扫码下载编程狮APP
public class Main { public static void main(String[] args) { byte b = -10; int x = Byte.toUnsignedInt(b); System.out.println("Signed value in byte = " + b); System.out.println("Unsigned value in byte = " + x); } }
运行结果如下:
联系方式:
扫描二维码
下载编程狮App
扫码关注 领资料包