Java and c define two-dimensional array subscript omission problem

A rookie, can't remember, write it down

------------- Discount -------------

The former can be omitted in c, and the latter cannot be omitted:

During initialization, the number of the second dimension represents the length of the allocated memory , and the number of the first dimension represents the multiple of the allocated memory ; the 
multiple can be counted by the machine, but if there is no length, it is difficult to open up space.

A two-dimensional array in java is an array of arrays. The front cannot be omitted, and the latter can be omitted: int[][] i = new int[6][];

Don't ask why, because I don't know either, anyone who knows can tell me

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325775058&siteId=291194637