我有一个名为对象Student,它有studentName,studentId,studentAddress,等有关studentId,我必须生成随机字符串包括七个数字charaters,例如.
Student
studentName
studentId
studentAddress
studentId = getRandomId(); studentId = "1234567" <-- from the random generator.
我必须确保没有重复的ID.
java string random char
char ×1
java ×1
random ×1
string ×1