使用java.util.UUID(通用唯一识别码)的randomUUID()方法:
java
import java.util.UUID;
public class Test {
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
String fileName = UUID.randomUUID().toString();
System.out.println(fileName);
}
}
}