Java · Decisions

Nested ifs and the dangling else

When one test sits inside another, an else can attach to a different if from the one its indentation suggests.