Javarevisited: 6 example to declare two dimensional array in Java
Pages 6 example to declare two dimensional array in Java Declaring a two-dimensional array is interesting in Java as Java programming language provides many ways to declare a 2D array and each way have some special things to learn about. For example, It's possible to create a two-dimensional array in Java without specifying the second dimension, sounds crazy right? but it's possible because two-dimensional array in Java is nothing but an array of array. You can even create a two-dimensional array where each subarray has different length or different type, also known as a heterogeneous array in Java. Some of the ways described here also apply how you to declare one-dimensional array e.g. changing the place of square brackets and it has implication on any other variables declared in the same line. An array is a data structure which stores elements in the contiguous memory location and allowed constant time access using indexes. For a detailed description of an array,Read full article from Javarevisited: 6 example to declare two dimensional array in Java
No comments:
Post a Comment