In memory, the rows of a two-dimensional array in Java can be __________.

  • none of the above
  • stored as linked lists
  • stored in random order
  • stored sequentially
In Java, the rows of a two-dimensional array are stored sequentially in memory. This means that the elements of each row are stored one after the other in memory, making it more efficient for accessing elements in a row. This sequential storage pattern is different from languages like C, where a 2D array is essentially an array of pointers to individual rows.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *