adding the extra For Loop java class