Initializing arrays with { }

前端 未结 0 1628
陌清茗
陌清茗 2021-01-21 02:59

Is there a difference between doing int[] s = new int[]{0, 1, 2, 3};

and

int[] s = {0, 1, 2, 3};

From what I can see, operations on either one are identical

相关标签:
回答
  • 消灭零回复
提交回复
热议问题