@@ -0,0 +1,642 @@
+package by.vorokhobko.5_Arrays;%0A%0A/**%0A* BubbleSort.%0A*%0A* Class BubbleSort bubble sorts the elements in the array part 001, lesson 5.%0A* @author Evgeny Vorokhobko (vorokhobko2011@yandex.ru).%0A* @since 21.12.2016.%0A* @version 1.%0A*/%0A%0Apublic class BubbleSort %7B%0A%09/**%0A%09* The class field.%0A%09* The method bubble sorts the elements.%0A%09* @param values - values.%0A%09* @return tag.%0A%09*/%0A%0A%09public int%5B%5D sorting(int%5B%5D values) %7B%0A%09%09for (int i = values.length - 1; i %3E 0; i--) %7B%0A%09%09%09for (int x = 0; x %3C i; x++) %7B%0A%09%09%09%09if (values%5Bx%5D %3E values%5Bx + 1%5D) %7B%0A%09%09%09%09%09int var = values%5Bx%5D;%0A%09%09%09%09%09values%5Bx%5D = values%5Bx + 1%5D;%0A%09%09%09%09%09values%5Bx + 1%5D = var;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return values;%0A%09%7D%0A%7D

add class BubbleSort