About 123,000 results
Open links in new tab
  1. Initialising a multidimensional array in Java - Stack Overflow

    Dec 4, 2013 · String[][] myStringArray = new String [x][y]; is the correct way to initialise a rectangular multidimensional array. If you want it to be jagged (each sub-array potentially has a different length) then you can use code similar to this answer.

  2. Java Multi-Dimensional Arrays - GeeksforGeeks

    Apr 23, 2025 · Three – Dimensional Array (3D-Array) 3D-Array is a complex form of a multidimensional array. A 3D-array can be seen as an array of 2D array for easier understanding. Representation of 3D Array in Tabular Format

  3. Java Multidimensional Array (2d and 3d Array) - Programiz

    Let's see how we can use a 3d array in Java. We can initialize a 3d array similar to the 2d array. For example, // test is a 3d array int[][][] test = { { {1, -2, 3}, {2, 3, 4} }, { {-4, -5, 6, 9}, {1}, {2, 3} } }; Basically, a 3d array is an array of 2d arrays. The rows of a 3d array can also vary in length just like in a 2d array.

  4. Three Dimensional Array in Java | 3D Array, Example

    Feb 14, 2025 · Learn three dimensional array in java with example programs, declaration of 3D array in java. An array with three indexes is called 3D array.

  5. 3D Arrays in Java | Creating, Inserting, Initializing the Elements ...

    How to Initialize Elements of 3D Arrays in Java? As mentioned above, initializing the whole array at once is a best practice when working with 3D arrays as it reduces the chances of confusion for future programming.

  6. Java 3D array initialization - Stack Overflow

    Jun 7, 2010 · I need to represent some spatial points: x,y,z when I try to initialize the array like this: int [] [] [] points { { {100, 120, 10}, {100, 120, 18}, ... } } I got an error:

  7. MultiDimensional Arrays In Java (2d and 3d Arrays In Java)

    Apr 1, 2025 · This Tutorial on Multidimensional Arrays in Java Discusses how to Initialize, Access and Print 2d and 3d Arrays in Java with Syntax & Code Examples.

  8. Initializing Arrays in Java - Baeldung

    Dec 16, 2024 · In this tutorial, we’ll see how to declare an array. Also, we’ll examine the different ways we can initialize an array and the subtle differences between them. A simple and complete reference guide to understanding and using Arrays in Java. Read more →. Learn how we can handle common array operations in Java. Read more →.

  9. 3D Three Dimensional Array In Java Syntax, Example 2025

    Jan 5, 2024 · The syntax for declaring and initializing a three-dimensional (3D) array in Java is as follows: datatype[][][] arrayName = new datatype[x][y][z]; Here’s what each part of this syntax means:

  10. Mastering Java Multidimensional Arrays: A Comprehensive Guide

    Apr 7, 2025 · Explore the intricacies of Java's multidimensional arrays with our in-depth guide. Learn how to declare, initialize, and utilize arrays of arrays to manage complex data structures effectively. TNS OK SUBSCRIBE Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important ...

  11. Some results have been removed
Refresh