Is the following line creates random number from 0 to 9 int n=(int)(Math.random*10);
Hey, import java.util.*; outside your class and use the following.👍 int r = new Random().nextInt(10); System.out.print(r);
@D_Stark If you know you are using only Random class from util package, it is best practice to import only the Random class. For example: import java.util.Random; To summarize, import only the packages you need.