0

Public static void main(String ...hello){}

above method. whats is the that "..." , what they doing ?

12th Apr 2018, 5:42 PM
JRaj Fx
JRaj Fx - avatar
6 Réponses
+ 3
Looks like an array notation from some languages. It just the same as main (String[] hello) {}
12th Apr 2018, 6:16 PM
Rull Deef 🐺
Rull Deef 🐺 - avatar
+ 5
Pseudo code: // array notation var a = func (["arg1", "arg2", "arg3"]); // triple dot notation var a = func ("arg1", "arg2", "arg3");
12th Apr 2018, 6:23 PM
Rull Deef 🐺
Rull Deef 🐺 - avatar
+ 3
If you use array notation [] you must give an array as argument for function call, when using triple dot notation (probably) you can pass separeted arguments, that will be used to craft an array
12th Apr 2018, 6:21 PM
Rull Deef 🐺
Rull Deef 🐺 - avatar
+ 2
Martin Taylor it's always fun but informative as well reading your answers 😂😂😂,
12th Apr 2018, 7:25 PM
Morpheus
Morpheus - avatar
0
thx, wht s the difference btwn both ?
12th Apr 2018, 6:18 PM
JRaj Fx
JRaj Fx - avatar
0
thax a lot for ur information
12th Apr 2018, 6:25 PM
JRaj Fx
JRaj Fx - avatar