Home> Java> javaTutorial> body text

Does Java support multidimensional arrays?

王林
Release: 2023-09-15 14:09:02
forward
930 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:
source:tutorialspoint.com
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 Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!