why these two method generate different results?

float ctrlPoints[10][10][3] = {…/fill it/…};

method 1:
FloatBuffer ctrlPointsBuf = BufferUtil.newFloatBuffer(ctrlPoints.length * ctrlPoints[0].length * ctrlPoints[0][0].length);

    for (int i = 0; i < ctrlPoints.length; i++){
        for (int j = 0; j < ctrlPoints[0].length; j++){
            for (int k = 0; k < ctrlPoints[0][0].length; k++){
                ctrlPointsBuf.put(ctrlPoints[i][j][k]);
            }
        }
    }
    ctrlPointsBuf.rewind();
    

    gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, ctrlPoints[0][0].length, ctrlPoints[0].length, 0, 1, ctrlPoints[0].length * ctrlPoints[0][0].length, ctrlPoints[0].length, ctrlPointsBuf);

method 2:
gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, ctrlPoints[0][0].length, ctrlPoints[0].length, 0, 1, ctrlPoints[0].length * ctrlPoints[0][0].length, ctrlPoints[0].length, ctrlPoints, 0);

My best guess would be that the method can’t handle multi-dimensional arrays.

Cheers,
Brett

thanks