What is the advantage of Double Dimensional Array over single Dimensional Array?
Answers
Answered by
22
ANSWER
ADVATAGE OF 2D OVER 1D ARRAY
- if we require to store a table or matix ( data like in a spreadsheet) which has more then 1 row and more then 1 column then by 1D we need decalre it more then 1 time instead if we use 2D then declaration of array only one at a time required.
- modelling,relationship, network with a graph, linked list, stack require 2D array
- also we can convert 2D array as 1D array.
- we can store a image in 2D array ( images are made up of pictures element or pixel and each pixel is one element of the 2Darray )
- java stores a 2D array as array of arrays.
so we can say that not only 2D array is used as a 1D array but also it work in other functions also.
hope it helps you
MARK ME AS BRAINLIEST
Answered by
4
Answer:
if we require to store a table or matix ( data like in a spreadsheet) which has more then 1 row and more then 1 column then by 1D we need decalre it more then 1 time instead if we use 2D then declaration of array only one at a time required. also we can convert 2D array as 1D array.
Similar questions