Java 面试题整理

1. 为什么下列代码中c = 3+7;可以正确输出,c = a + b;却编译报错? public static void main(String[] args) {     byte a = 3;     byte b = 7;     byte c = 10;     c = 3+7;//3、7是常量,int类型。     System.out.println(c);//可以正确输出。    
相关文章
相关标签/搜索