All pastes #631422 Raw Edit

Absurd-Mind

public java v1 · immutable
#631422 ·published 2007-07-23 23:01 UTC
rendered paste body
import java.util.ArrayList;public class BubbleSort implements Runnable {		static int zaehler;		public int[] bs(int[] zahlenfeld) {		int trigger = 10;                Thread zaehlen = new Thread(new BubbleSort());		int puffer;		zaehlen.start();				for(int i = 0; i < zahlenfeld.length; i++) {			for(int o = i; o < zahlenfeld.length; o++){								zaehler = i;				if(zahlenfeld[i] > zahlenfeld[o]) {					puffer = zahlenfeld[i];					zahlenfeld[i] = zahlenfeld[o];					zahlenfeld[o] = puffer;				}			}		}				zaehlen.stop();		return zahlenfeld;				}		public void run() {							System.out.print(zaehler + " ");			try {				Thread.sleep(50);			} 			catch (InterruptedException e) {				e.printStackTrace();			}				}}