+ 4

What is different between String[ ] args and String... args in Java?

I know it from internet but I dont understand what it mean?

17th Feb 2019, 11:10 AM
Fajar Maftuh Fadli
Fajar Maftuh Fadli - avatar
1 Respuesta
+ 5
String[] means an array of strings String... means varargs notation (variable arguments), meaning that the function can take an unspecified number of String arguments -- as opposed to a single array of String Read more: https://www.programcreek.com/2014/01/java-varargs-examples/ Check this code to see some application of varargs: https://code.sololearn.com/cXqSPD87Puoi/#java
17th Feb 2019, 12:37 PM
Tibor Santa
Tibor Santa - avatar