当前位置:网站首页>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);
}
}
边栏推荐
- Are the microorganisms in the intestines the same as those on the skin?
- Txt file virus
- Unity3D学习笔记5——创建子Mesh
- V20变频器手自动切换(就地远程切换)的具体方法示例
- 聊聊支付流程的设计与实现逻辑
- Inftnews | web5 vs Web3: the future is a process, not a destination
- CAIP2021 初赛VP
- 2021-01-11
- Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020
- 小程序多种开发方式对比-跨端?低代码?原生?还是云开发?
猜你喜欢

微信论坛交流小程序系统毕业设计毕设(1)开发概要

小程序多种开发方式对比-跨端?低代码?原生?还是云开发?

I wish you all the best and the year of the tiger

Introduction to redis and jedis and redis things

Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020

USB(十五)2022-04-14

js 获取对象的key和value

Innovation today | five key elements for enterprises to promote innovation

STL标准模板库(Standard Template Library)一周学习总结

【刷题记录】3. 无重复字符的最长子串
随机推荐
Dynamics 365 find field filtering
Network security -beef
聊聊支付流程的设计与实现逻辑
十三、系统优化
Txt file virus
Quelles sont les similitudes et les différences entre les communautés intelligentes et les villes intelligentes?
Wechat forum exchange applet system graduation design (3) background function
消息队列与快递柜之间妙不可言的关系
Brush question 5
Comparison of various development methods of applets - cross end? Low code? Native? Or cloud development?
Database daily question --- day 22: last login
V20变频器手自动切换(就地远程切换)的具体方法示例
How to operate DTC community?
About idea cannot find or load the main class
Adrnoid Development Series (XXV): create various types of dialog boxes using alertdialog
2021-01-12
opencv scalar传入三个参数只能显示黑白灰问题解决
Inftnews | the wide application of NFT technology and its existing problems
Introduction to redis and jedis and redis things
30讲 线性代数 第五讲 特征值与特征向量