关于byte运算后不能编译

byte c=10/3可以编译成功

但是int a=10
byte c=a/3为啥不可以啊

  public static void main(String[] args) {
       int  a =  10;
       byte c = (byte) (a/3);
        System.out.println(c);

    }

做一个强制类型转化就可以了
有帮助望采纳

是因为10/3的结果在byte取值范围内而a是int类型算出的结果也是int类型在转换成byte类型后有精度损失吗?