practice with Java loops