有这样一个代码
class mm 
{      public static void main(String[] args) 
{        
    short a=1;
byte b=2;
        a=a+b;
   }  
}
编译报错  有可能发生精度损失  ,当然是因为short和byte的运算 都要转化为int的运算 而左边的a却是short 高精度变低精度会发生编译报错问题
然而
class mm 
{      public static void main(String[] args) 
{        
    short a=1;
byte b=2;
        a=+b;
   }  
}
将a=a+b改为红字所示  编译就过了 这个让我发觉自己原来没有很好去理解啊a+=b这种模式含义希望哪个高手给我讲解下  这种情况为什么又没错