4 阅读下面的程序, 分析代码是否能够编译通过,选择相应选项 public class Test01 { public static void main(String[] args) { byte b = 3; b = b + 4; System.out.println("b=" + b); } }
A.
编译不通过。 int 值 4 和 b 相加时,由于变量 b 的类型为 byte ,取值范围没有 int 类型大,存不下 int 类型的值。
B.
编译通过。 输出结果为:b=7
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】II:根据定语从句所缺的成分填上正确的代词或副词。 1.A doctor is a person _____ looks after people's health. 2. This is the mountain village _____ I stayed for two weeks. 3.The school_______he once studied in is very famous. ...
【简答题】单句改错题: 1. Your family is very kind. I'll never forget the favor you've done me. 2. When and where to build the new school haven't been decided. 3. Three quarters of the land is covered with green gras...