java基础中容易出错的地方

一、 byte a=1; byte b=2; byte c=a+b;   //编译错误,由于short,char,byte运算时是转换为int在计算的。                      // 换成 int c=a+b;正确java 二、 char x='a'; char x1='b'; char x3=(char)(x+x1); System.out.println(x3);      
相关文章
相关标签/搜索