Duplicating byte array multiple times I have this code that duplicates a byte array 5 times. 

class Multiple {
    public static void main(String[] args) {
        byte[] result = new byte[] {0x41,0x42,0x43,0x44};
        int len = result.length;
        byte[] multipled = new byte[len*5];
        for (int i = 0; i &lt; 5; i++) {
            for (int j = 0; j &lt; len; j++) {
                multipled[i*len + j] = result[j];
            }
        } 
        System.out.println(new String(multipled));
        System.out.println(new String(result));
    }
}


Example:


ABCDABCDABCDABCDABCD
ABCD



The code uses multiple loops and assignment, can it be better or shorter?
It can be made shorter:

public static void main(String[] args) {
    byte[] result = new byte[] {0x41, 0x42, 0x43, 0x44};
    byte[] multipled = new byte[result.length * 5];
    for (int i = 0; i &lt; multipled.length; i++)
        multipled[i] = result[i % result.length];
    ...
}