byte a =(byte)129; System.out.println(a);//会输出什么呢?
public class Test {
public static void main(String args[]){
byte a =(byte)129; //注意byte只占一个字节的存储空间,最大值只能是127
System.out.println(a); //呵呵,结果是-127,画一下内存图就懂了!...
}
}
探索代码的奥秘,享受技术的乐趣-_-!...