pair all the elements
12345678910111213141516
class Main {
public static void main(String[] args) {
int[] boxes = {1, 2, 3, 4, 5};
for (int i = 0; i < boxes.length; i++){
for(int j = 0; j < boxes.length; j++) {
System.out.print(boxes[i]);
System.out.print(", ");
System.out.println(boxes[j]);
}
}
}
}
Java
INFO