Thursday, March 22, 2007

boolean and JVM

Booelan one of little cryptic primitive types in Java
Here are a few things i noticed about the same

1) depth of a boolean, is virtual-machine dependent

2) JVM spec syas that ....
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 typ

3) When the Java source is compiled into bytecode, then in the bytecode booleans are treated the same way as ints. For the Java programmer this isn't relevant, because when you're programming in Java you are only working on the level of the Java language, and not on the bytecode level.
' There's a difference between the Java programming language and the bytecode - don't confuse them '

No comments: