public class BubbleSort { public static void main (String[] arg) { char[] zufall1 = {'z', 'h', 'a', 'd', 'x', 'b', 'k', 'l', 'm'}; int zuw=0; int vergl=0; Out.println(zufall1); bubbleSort(zufall1,zuw,vergl); Out.println(zuw); Out.println(vergl); Out.println(zufall1); } static void bubbleSort(char[]zufall1, int zuw, int vergl) { char tmp; for (int i = zufall1.length-1; i >=0; i--) { for (int j = 1; j <=i; j++) { if (zufall1[j-1] > zufall1[j]) { vergl = vergl++; tmp = zufall1[j-1]; zuw = zuw++; zufall1[j-1] =zufall1[j]; zuw = zuw++; zufall1[j] = tmp; zuw = zuw++; } } } } }