Why use the params keyword?
With params you can call your method like this: addTwoEach(1, 2, 3, 4, 5); Without params, you can’t. Additionally, you can call the method with an array as a parameter in both cases: addTwoEach(new int[] { 1, 2, 3, 4, 5 }); That is, params allows you to use a shortcut when calling the method. … Read more