How to Loop Through Arguments Passed to function
package com.apryll.package2; public class sample2 { public static void main(String args[]) { sample2 objsample2 = new sample2(); objsample2.argCount(1, 2, 3, 4); } public void argCount(int... args) { System.out.println(args.length); } }