当前位置:网站首页>How to generate unique file names
How to generate unique file names
2022-07-07 23:16:00 【codepig16】
Mode one
Generate a five digit random number plus the month, day, minute and second of the current time
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
public class MyUtil {
public static void main(String[] args) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
Random random = new Random();
String unique = random.nextInt(89999 + 10000) + simpleDateFormat.format(new Date());
System.out.println(unique);
}
}
边栏推荐
- Network security sqlmap and DVWA explosion
- 网络安全-永恒之蓝
- kubernetes的简单化数据存储StorageClass(建立和删除以及初步使用)
- 2021-01-11
- Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020
- Talk about DART's null safety feature
- Bea-3xxxxx error code
- How to operate DTC community?
- Cases of agile innovation and transformation of consumer goods enterprises
- Specific method example of V20 frequency converter manual automatic switching (local remote switching)
猜你喜欢

Wechat forum exchange applet system graduation design (5) assignment

微信论坛交流小程序系统毕业设计毕设(3)后台功能

JMeter-接口自动化测试读取用例,执行并结果回写

UE4_UE5结合罗技手柄(F710)使用记录

iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地

The wonderful relationship between message queue and express cabinet

Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night

UE4_UE5全景相机

ArcGIS: two methods of attribute fusion of the same field of vector elements

Inftnews | web5 vs Web3: the future is a process, not a destination
随机推荐
Classification and prediction of heartbeat signal
One question per day - pat grade B 1002 questions
微信论坛交流小程序系统毕业设计毕设(1)开发概要
JS triangle
[network] Introduction to C language
聊聊 Dart 的空安全 (null safety) 特性
[untitled] reprint melting ice - track icedid server with a few simple steps
Brush question 4
Dynamics 365 find field filtering
微信论坛交流小程序系统毕业设计毕设(4)开题报告
网格(Grid)
PMP project management exam pass Formula-1
Advantages and disadvantages of rest ful API
Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to JSP-1
十三、系统优化
Exploratory data analysis of heartbeat signal
Clean C disk
Network security - Eternal Blue
聊聊支付流程的设计与实现逻辑