Difference between int[] array and int array[]

前端 未结 25 3054
轻奢々
轻奢々 2020-11-21 07:18

I have recently been thinking about the difference between the two ways of defining an array:

  1. int[] array
  2. int array[]
  3. <
25条回答
  •  自闭症患者
    2020-11-21 07:51

    The most preferred option is int[] a - because int[] is the type, and a is the name. (your 2nd option is the same as this, with misplaced space)

    Functionally there is no difference between them.

提交回复
热议问题