Generieren Sie eine zufällige Ganzzahl

Math.floor(Math.random()*10)
Javasper