If int[][] arr = new int[3][]; then arr[0] is a ________.

  • 1D array
  • 2D array
  • empty array
When you declare a two-dimensional array like int[][] arr = new int[3][];, arr[0] is a 1D array that can hold integers. In this declaration, you specify the number of rows (3), but the number of columns is left unspecified, so it's an array of arrays with no specific size.
Add your answer
Loading...

Leave a comment

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