Array of arrays
Java doesn’t provide multidimensional arrays. The concept of a multidimensional array is implicitly translated to an array of arrays.
On the contrary COBOL has multidimensional arrays and does not support implicit arrays of arrays instead.
For the above reason, a Java code like this
public class arrays {
    public static void main (String[] args) {
        String[][] strarr = new String[3][2];
        String[] subarr = new String[2];
        subarr[0] = "OK";
        subarr[1] = "OK";
        strarr[0] = subarr;
        System.out.println (strarr[0][0]);
        System.out.println (strarr[0][1]);
    }
}
cannot be translated to COBOL as follows:
       program-id. arrays.
       configuration section.
       repository.
           class StringArr1 as "java.lang.String[]"
           class StringArr2 as "java.lang.String[][]"
           class JSystem   as "java.lang.System"
           .
       working-storage section.
       77 subarr object reference StringArr1.
       77 strarr object reference StringArr2.
 
       procedure division.
       main.
           set strarr to StringArr2:>new(32).
           set subarr to StringArr1:>new(2).
           set subarr(0to "OK".
           set subarr(1to "OK".
           set strarr(0to subarr.
           JSystem:>out:>println(strarr(00)).
           JSystem:>out:>println(strarr(01)).
           goback.
The correct translation is the following:
       program-id. arrays.
       configuration section.
       repository.
           class StringArr1 as "java.lang.String[]"
           class StringArr2 as "java.lang.String[][]"
           class JSystem   as "java.lang.System"
           .
       working-storage section.
       77 subarr object reference StringArr1.
       77 strarr object reference StringArr2.
       77 i      pic 9(3).
 
       procedure division.
       main.
           set strarr to StringArr2:>new(32).
           set subarr to StringArr1:>new(2).
           set subarr(0to "OK".
           set subarr(1to "OK".
           perform varying i from 0 by 1 until i = subarr:>length()
              set strarr(0, i) to subarr(i)
           end-perform.
           JSystem:>out:>println(strarr(00)).
           JSystem:>out:>println(strarr(01)).
           goback.