Write a Java program to reverse an array. You need to create…
Write a Java program to reverse an array. You need to create 2 methods: 1. The first method takes a double array as a parameter and returns nothing. It accepts user’s inputs and puts the values into the array. 2. The second method takes a double array as a parameter and returns nothing. It prints out the array’s values in reverse. Within main function, you should declare a double array of size 5. Then use the first method to fill up the array and use the second method to print out the values in reverse.