The Random class is in java.util. So you must include import java.util.* ... nextInt(n+1) to obtain a random integer from 0 to n.
確定! 回上一頁