Answer:
The method written in Java is as follows:
public static void ArrayReverse(int myarray[]){
for(int index = myarray.length-1; index>=0;index--)
System.out.print(myarray[index]+" ");
}
Explanation:
This line defines the method
public static void ArrayReverse(int myarray[]){
This line iterates through the array from highest to least index
for(int index = myarray.length-1; index>=0;index--)
This prints the array elements in reverse
System.out.print(myarray[index]+" ");
}
To call the method from the main, use the following:
ArrayReverse(myarr);
However, myarr must be declared and populated as an integer array before the method is called
See attachment for illustration of the complete program (the main and the array reverse method)