更正一下,关于布尔值There are no casts between integer types and the boolean type. Some languages, most notably C and C++, allow numeric values to be interpreted as logical values. This is not permitted in the Java programming language; When a boolean type is required, only boolean values can be used. 官方的原话也并没有指出boolean值到底占多大空间,总之Java语言中的布尔是一种特殊的数据类型,它与其他数据类型之间不能相互赋值很多参考书上明确指出boolean占一位:0,1(如yiyi2007所说),不过官方似乎并没有明确的界定
这2个问题Thinking in Java里有提到~
主要不是与定义时有关,是与方法调用的机制有关http://blog.csdn.net/bryantd/archive/2006/03/12/622278.aspx
反正就2种
-128到127的Integer都被设置为共享比较一下 Boolean 就知道了