What are different ways to declare two-dimensional arrays?
Answers
Answered by
2
You can access elements of a two dimensional array either by using both indexes or just one index. For example salutation[0][1] represent a Single String in Java, while salutation[0] represent a one dimensional array ( a single row in the 2 dimensional array).
Answered by
0
The different ways to declare two-dimensional array:
- Multi-dimensional arrays are just an array of the array in Java.
- A 'two-dimensional array' is very easy to create as the same fashion we do for a 'one-dimensional array'. To create a 'two-dimensional array' instead of one bracket, we will use two.
- A 'two-dimensional array' in Java is an array of a one-dimensional array, so we can also create a 'two-dimensional array' where distinct one-dimensional arrays with various lengths.
To know more about array
Compare different types of arrays in open technology
https://brainly.in/question/9143589
Please give me the advice about how should I understand array in java.
http://brainly.in/question/5809961
Similar questions