Java: Declaring a multidimensional array without specifying the size of the array ( eg. new int[10][] )

前端 未结 6 1251
忘掉有多难
忘掉有多难 2021-01-13 09:08

I\'ve been trying to figure out what exactly is happening here. I\'m just trying to figure out what the 2 lines are doing that I\'ve commented on below. I found this program

6条回答
  •  -上瘾入骨i
    2021-01-13 09:24

    It's simply declaring an array of 10 arrays. The lengths of each of those "sub" arrays can all be different.

提交回复
热议问题