@@ -0,0 +1,1001 @@
+package ru.sbulygin;%0A%0A/**%0A* Class RotationArray.%0A* @author sbulygin.%0A* @since 11.12.2016.%0A* @version 1.0.%0A*/%0A%0Apublic class  RotationArray %7B%0A%0A    /**%0A    * Method turn.%0A    * This method array rotates 90 degrees.%0A    * @param value array of integer values.%0A    * @return inverted array.%0A    */%0A    public int%5B%5D%5B%5D turn(int%5B%5D%5B%5D value) %7B%0A        if (value == null %7C%7C value.length %3C= 1) %7B%0A            throw new IllegalArgumentException(%22Array cannot have lenght %3C= 1 or equal to 0.%22);%0A        %7D%0A        for (int i = 0; i %3C value.length / 2; i++) %7B%0A            for (int k = 0; k %3C value.length - 1 - i; k++) %7B%0A            int tmpCell = value%5Bi%5D%5Bk%5D;%0A            value%5Bi%5D%5Bk%5D = value%5Bk%5D%5Bvalue.length - 1 - i%5D;%0A            value%5Bk%5D%5Bvalue.length - 1 - i%5D = value%5Bvalue.length - 1 - i%5D%5Bvalue.length - 1 - k%5D;%0A            value%5Bvalue.length - 1 - i%5D%5Bvalue.length - 1 - k%5D = value%5Bvalue.length - 1 - k%5D%5Bi%5D;%0A            value%5Bvalue.length - 1 - k%5D%5Bi%5D = tmpCell;%0A            %7D%0A        %7D%0A        return value;%0A    %7D%0A %7D

add RotationArray