package ru.job4j.array;

/**
 * Programm Turn.
 *
 * @author Vladimir Zhirnov (harabe@yandex.ru)
 * @version 0.1
 * @since 11.07.2017
 */
public class Turn {
	/**
	* The method must inverted the array.
	* @param array - integer array
	* @return inverted array
	*/
	public int[] back(int[] array) {
	int[] result = new int[array.length];
		for (int i = 0, j = 1; i < array.length; i++, j++) {
			result[i] = array[array.length - j];
		}
		return result;
	}
}
@@ -295,47 +295,8 @@
 ) %7B%0A
-%09int%5B%5D result = new int%5Barray.length%5D;%0A
 %09%09fo
@@ -316,15 +316,8 @@
  j =
- 1; i %3C
  arr
@@ -329,16 +329,27 @@
 ngth
+ - 1; i %3C j
 ; i++, j
 ++) 
@@ -348,52 +348,80 @@
 +, j
-++
+--
 ) %7B%0A%09%09%09
-result%5Bi%5D = array%5Barray.length - j%5D
+int temp = array%5Bj%5D;%0A%09%09%09array%5Bj%5D = array%5Bi%5D;%0A%09%09%09array%5Bi%5D = temp
 ;%0A%09%09
@@ -435,14 +435,13 @@
 urn 
-result
+array
 ;%0A%09%7D

change turn