Home > Java > javaTutorial > Does Java support multidimensional arrays?

Does Java support multidimensional arrays?

王林
Release: 2023-09-15 14:09:02
forward
1189 people have browsed it

Does Java support multidimensional arrays?

No, Java does not support multidimensional arrays.

  • Java supports arrays of arrays.
  • In Java, a two-dimensional array is nothing more than an array of one-dimensional arrays.

int[][] arr = new int[2][4];

  • Expression arr[i] Select a one-dimensional array, expression arr[i ][j] Selects elements from this array.
  • The array index for each dimension ranges from zero to "length". where length is the length of the array in the given dimensions.
  • There is no array assignment operator. Once an array is allocated, the number of dimensions and the size of each dimension are fixed.

The above is the detailed content of Does Java support multidimensional arrays?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template