Varargs

Just like you have variadic functions in C, Java has the Varagrs :) . Its usage is as simple as this :

public List<String> getModifiers(String... arg) {
  // arg is String[]
}

And the wonderful thing is that the arg is a String[].

You could also read

0 Response to “Varargs”


  • No Comments

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.




Theme Tweaker by Unreal