Consider the following unformatted nested if-else Java code
if-else
if (condition 1) if (condition 2) action 1; else action 2;
My ques
You can try it and find that the else applies to the inner if:
else
if
http://ideone.com/iBorYi
This is a good reason not to write code like this. It's very hard to read and understand what is happening.