Even if you have final boolean boo = true;
The else part will compile ok and the program will print out "if" successfully.
Instead of an if condition check, if you have a while loop, this will give compile error :
class Buggy {
public static void main ( String args [ ] ) {
final boolean boo = true ;
if ( boo ) {
System.out.println ( " if " ) ;
} else;
while (!boo){
System.out.println ( " while " ) ;
}
}
};
Compile error on printing while !!
HTH,
Janus