we can have two declaration for String array
1>String... sampleStringArray;
2>String sampleStringArray[];
can anyone tell me the difference
we can have two declaration for String array
1>String... sampleStringArray;
2>String sampleStringArray[];
can anyone tell me the difference
The first is an example of varargs and the wikipedia notes These values will be available inside the method as an array, must be the last parameter in a given method, and is otherwise accessed as an array (also it wasn't added to the language until Java 5).