Write a program that implements the example described at the beginning of Section 9.6. Your program should shift the array’s elements from position x to position x – 1, as described in that section. (Move the value at position 1 to position 0; move the value at position 2 to position 1, and so on).
Start by creating two arrays,
double[] initialHoursanddouble[] hours.In its declaration initializeinitialHourswith the values{8, 8, 6, 4, 7, 0, 0, 5},but don’t initialize hours when you declare and instantiate it with its 31 elements. Instead, initializehoursafter its creation by usingSystem.arraycopyto copy all the values ininitialHoursinto the first elements in hours. Then perform one down-shift operation, and load zero into the (new) highest element.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.