Difference between int[] array and int array[]

前端 未结 25 3053
轻奢々
轻奢々 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:53

    There is no real difference; however,

    double[] items = new double[10];
    

    is preferred as it clearly indicates that the type is an array.

提交回复
热议问题