|
Java™ by example!
|
|
|
How do create a method with a variable number of arguments?
JDK1.5 allows methods to have a variable number of arguments. The syntax is to specify the type, three dots and the argument name. The variable number of arguments must be the last argument to the method. Other (normal) arguments may precede the variable argument list. Only one variable argument list may be specified.
Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|