Java

Cleaner if-statements: Indentation hell & failing fast

Let’s have a look at two common issues with if statements: Indentation hell aka too deeply nested if statements and fail fast if statements at the beginning of a certain code block instead of wrapping the whole code block with an if statement.