public class Zufallszahlen { /** * @param args */ public static void main ( String [] args ) { // Zufallszahl zwischen 0 und 1 System.out.println(Math.random()) ; // Zufallszahl zwischen 1 und 10 int zufall10 = ((int) (Math.random()*100)) % 10 +1; System.out.println(zufall10); } }