我已经看到了两种不同的声明String数组的方法,但我并没有表现出差异.任何人都可以解释有什么区别
字符串args []
和
String[] args
解决方法
没有区别(在Java中).他们完全是一回事.从
JLS §10.2开始:
The [] may appear as part of the type at the beginning of the declaration,or as part of the declarator for a particular variable,or both.