Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to define an integer two-dimensional array in java?
How to define an integer two-dimensional array in java?
// java's two-dimensional array is actually an array of arrays. //Defines an int[] array of three lengths. The length of each row can be completely different, and of course it can be the same. //All the same. There's nothing to say. It's just different. int[][]arr = new int[3][]; //The first int[] gives four lengths arr [0] = new int [4]; //The second int[] gives six lengths arr [0] = new int [6]; //The third int[] gives two lengths arr [0] = new int [2];