可能重复:
What is the correct Java main() method parameters syntax?
为什么这些都有效?
static void main(String[] args )
static void main(String args[] )
static void main(String... args )
它们之间有什么区别吗?
答案 0 :(得分:6)
它们之间有什么区别吗?
没有区别只是不同的表现
答案 1 :(得分:0)
没有区别..
String[] args; // This representation means that args is of String[] type(Basically array)
String args[]; // This means that args is an array(an array of string type)
String... args; // This means that args is a string of variable length(Thus acting as an array)