[java] why are there two different kinds of for loops in java?