8.boolean 布尔型表示一位的信息;只有两个取值:true 和 false;占用内存大小不确定(单个boolean b 32bit,boolean [] bs 中的item 站8bit 来自1.7 JVM规范)
Although the java virtual machine defines a boolean type,it only provides very limited support for it.There are no Java virtual machine instructions solely dedicated to operations on boolean values. Instead, expressions in the java programming language that operate on boolean values are compiled to use values of the java virtual machine int data type.
The java virtual machine does directly support boolean arrays. Its newarray instruction enables creation of boolean arrays. Arrays of type boolean are accessed and modified using the byte array instruction baload and bastore .
In oracle java virtual machine implementation, boolean arrays in the java programming language are encoded as java virtual machine byte arrays, using 8 bits per boolean element .
The java virtual machine encodes boolean array components using 1 to represent true and 0 to represent false . Where java programming language boolean values are mapped by compilers to values of java virtual machine type int , the compilers must use the same encoding