define 2d array using arrays java code example Example: 2d array java int[][] arr = new int[10][20]; arr[0][0] = 1;