Nullity Checks
Correctly check for nullity before accessing attributes of a class / variables.
if (a != null (!!!) && a.length > 0)
Watch out for this in exercises.
Loop Invariants
Keep in mind the loop variable is incremented by one after the loop body usually. This means we often have to do i - 1 before using it in our formula.
The same is true for the Loop Invariant after the execution of the loop. Thus we have to adapt the i <= n to i <= n + 1 usually.