Question d’entretien chez Mastercard

Coding Question : given two paramets of methos a number array and a target integer. write a code in java, it returns index of ints whose sum is target number