What is the correct Java main() method parameters syntax?

前端 未结 9 1313
旧巷少年郎
旧巷少年郎 2020-12-06 07:56

Is there a functional difference between these methods?

public static void main(String[] args) { }

public static void main(String args[]) { }
9条回答
  •  日久生厌
    2020-12-06 08:51

    No, they have no difference. Though... I used to use the second way, until my girlfriend threatened to break if I continued doing it (not kidding). So now I prefer the first way, and I think it looks much better.

提交回复
热议问题