for durch while Schleife ersetzt
This commit is contained in:
parent
84ae98a143
commit
1d602b48f0
|
|
@ -40,7 +40,7 @@ public class Lottozahlen {
|
|||
|
||||
// Lottozahlen ziehen
|
||||
HashSet<Integer> lottozahlenSet = new HashSet<>(6);
|
||||
for (; lottozahlenSet.size() < 6;) {
|
||||
while (lottozahlenSet.size() < 6) {
|
||||
lottozahlenSet.add((int) (Math.random() * 49) + 1);
|
||||
}
|
||||
ArrayList<Integer> lottozahlen = new ArrayList<>(lottozahlenSet);
|
||||
|
|
|
|||
Loading…
Reference in New Issue