Q:

How do i output 1-d arrays in a set #(10) per line?

i know i can use many if statements together but i think thats annoying, is there any better way?
    for(index=0; index<alpha.length; index++)
    {
        System.out.print(alpha[index]+ "");
        if (index == 9)
            System.out.println();
        if (index == 19)
            System.out.println();
        if (index == 29)
            System.out.println();
        if (index == 39)
            System.out.println();
    }

A:

if ((index + 1) % 10 == 0) 

This(%) is a rest of division. 

