22 +=隐式类型转换

 1 public class Test1_DataTypeConversion {
 2 
 3     public static void main(String[] args) {
 4              byte b = 1;
 5              b+=1  // b = byte(b+1)  底层自动加上强制转换符
 6              System.out.println(b);
 7              
 8              //b=b+1 
 9              
10              
11     }
12 
13 }

 

posted @ 2017-01-20 23:04  panw3i  阅读(120)  评论(0编辑  收藏  举报