扫码下载编程狮APP
public class Main { public static void main(String[] args) { String s = "65"; byte b = Byte.valueOf(s); System.out.println(b); // Causes a NumberFormatException since the value is out of range System.out.println(Byte.valueOf("129")); } }
运行结果如下:
联系方式:
扫描二维码
下载编程狮App
扫码关注 领资料包