Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Last active July 15, 2020 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/cb43bba03b68c1fb128e276c6da90985 to your computer and use it in GitHub Desktop.
Save anjanashankar9/cb43bba03b68c1fb128e276c6da90985 to your computer and use it in GitHub Desktop.
public int add(int... varargs) {
sum = 0;
for (int i=0; i<arr.length; i++) {
sum+=arr[i];
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment