All pastes #626912 Raw Edit

Jemand

public java v1 · immutable
·published 2007-07-19 23:24 UTC
rendered paste body
import java.util.ArrayList;import java.lang.*;import javax.swing.JOptionPane;public class Stoppuhr {			static long millis = System.currentTimeMillis();		static long laufzeit = Integer.valueOf(JOptionPane.showInputDialog("Laufzeit"));	static long trigger = Integer.valueOf(JOptionPane.showInputDialog("Trigger"));	static ArrayList<Integer> speicher = new ArrayList<Integer>();			public static void main(String[] args) throws InterruptedException {		ArrayFuellen(laufzeit, trigger);					for(int i = 0; i < speicher.size(); i++)			System.out.println(speicher.get(i));			}					public static void ArrayFuellen(long laufzeit, long trigger) throws InterruptedException {				int i = 1;		while((System.currentTimeMillis() - millis) <= laufzeit) {									speicher.add(i);			i++;			Thread.sleep(trigger);					}			}							}