Random();为什么用toString()转不过来?
public static String ss(int i) {
Random rd = new Random();
int Rd = rd.nextInt(i);
return Rd.toString();
}
public static void main(String[] args) {
System.out.println(ss(10));
}
}
public static String ss(int i) {
Random rd = new Random();
int Rd = rd.nextInt(i);
return Rd.toString();
}
public static void main(String[] args) {
System.out.println(ss(10));
}
}
2019-12-16
举报