Question d’entretien chez Infosys

Write function and main for reversing the elements of an array in java.