当我编译代码时,它显示类似“可能会丢失精度”之类的内容并找到:int required:byte
如何解决此错误?
class addition {
public static void main(String args[]) {
byte a = 10;
byte b = 10;
byte c = a + b;
System.out.println("Addition of a and b is:" + c);
}
}