View difference between Paste ID: 14j0TEx9 and KsMGBzhx
SHOW: | | - or go back to the newest paste.
1
import java.util.Random;
2
3
4
public class Geld {
5
6
	private static int[] geld = new int[8];
7
	private static int n = 5;
8-
	private static Random rand = new Random();
8+
9
	public static int[] getGeld() {
10
		return geld;
11
	}		
12
13
	
14
	public static void zahlung() {
15
		
16
		Random rand = new Random();
17
	
18-
	for ( int i=0; i < geld.length; i++) {
18+
		for ( int i=0; i < geld.length; i++) {
19
		
20-
		geld[i] = rand.nextInt(n);
20+
			geld[i] = rand.nextInt(n);
21
		
22-
	}	
22+
		}	
23
24
25
	}
26
		
27
	public static float[] zusammenzaehlen(int[] zahl){
28
		float[] geldfloat = new float[8];
29
		
30
		
31
		for ( int i=0; i < geldfloat.length; i++) {
32
			geldfloat[i]=zahl[i];
33
			
34
		}
35
		return geldfloat;
36
	}
37
}