To generate a random number between two given values in Java, you can use the nextInt method of the java.util.Random class. For example:
確定! 回上一頁