The first one is pretty simple - since induction variables go up by fixed amounts per iteration, you can pre-compute the maximum value for any induction variable used as an array subscript and check that it doesn't exceed the array bounds. You'd do this once, before executing the loop, rather than checking the subscript on each iteration.
As for the second, there are plenty of examples (in various languages, including Java) of loop-invariant and induction-variable loops out there - just Google for those terms.