Nested if-else behaviour without braces

From the Java Language Specification:

The Java programming language, like C and C++ and many programming languages before them, arbitrarily decrees that an else clause belongs to the innermost if to which it might possibly belong.


Block 1 is correct, in if else situations with no brackets the else is linked to the nearest if

if (condition 1)  
if (condition 2)
action 1;
else
action 2;

is the same as

if (condition 1)
    if (condition 2)
    action 1;
    else
    action 2;

also brackets are for the sake of understanding level, and ease. In larger if else statements, having no brackets makes error very common