What is the difference between String[] and String… in Java?
How should I declare main() method in Java? String[] and String… are the same thing internally, i. e., an array of Strings. The difference is that when you use a varargs parameter (String…) you can call the method like: And when you declare the parameter as a String array you MUST call this way: What’s actually the difference between String[] and String… if … Read more