SyntaxFix
Write A Post
Hire A Developer
Questions
Yes Java allows vargs in method parameter .
vargs
public class Varargs { public int add(int... numbers) { int result = 1; for(int number: numbers) { result= result+number; } return result; } }