In JavaScript, we can call a function using each item in an array as seperate arguments. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator
// Using the spread operator
function myFunction(x, y, z) { }
var args = [0, 1, 2];
myFunction(...args);
// Using the .apply method
function myFunction(x, y, z) { }
var args = [0, 1, 2];
myFunction.apply(null, args);
Is there any equivalent in Java?