character pattern programs in java using for loop how to iterate through java list five 5 ways to iterate