To generate random numbers in Java, use. import java.util.Random;. Now, take Random class and create an object. Random num = new Random();.
確定! 回上一頁