8.582
Bearbeitungen
Jneug (Diskussion | Beiträge) |
Jneug (Diskussion | Beiträge) |
||
| Zeile 414: | Zeile 414: | ||
| <syntaxhighlight lang="java"> | | <syntaxhighlight lang="java"> | ||
Random rand = new Random(); | Random rand = new Random(); | ||
// Zufallszahl von 0 bis 99 | |||
int zufall = rand.nextInt(100); | int zufall = rand.nextInt(100); | ||
// Zufallszahl von 50 bis 69 | |||
int zufall2 = rand.nextInt(20)+50; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||