当前位置:网站首页>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);
}
}
边栏推荐
- Wechat forum exchange applet system graduation design completion (8) graduation design thesis template
- USB(十四)2022-04-12
- USB(十六)2022-04-28
- GEE(三):计算两个波段间的相关系数与相应的p值
- Install a new version of idea. Double click it to open it
- Inftnews | the wide application of NFT technology and its existing problems
- V20变频器手自动切换(就地远程切换)的具体方法示例
- 每日一题——PAT乙级1002题
- 七月第一周
- 网格(Grid)
猜你喜欢

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

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

Brush question 3

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

Matlab-SEIR传染病模型预测

Innovation today | five key elements for enterprises to promote innovation

Comparison of various development methods of applets - cross end? Low code? Native? Or cloud development?

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

Specific method example of V20 frequency converter manual automatic switching (local remote switching)

Install a new version of idea. Double click it to open it
随机推荐
七月第一周
Unity3D学习笔记4——创建Mesh高级接口
iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
Quelles sont les similitudes et les différences entre les communautés intelligentes et les villes intelligentes?
2021ICPC上海 H.Life is a Game Kruskal重构树
kubernetes的简单化数据存储StorageClass(建立和删除以及初步使用)
Byte hexadecimal binary understanding
为什么市场需要低代码?
Kubernetes' simplified data storage storageclass (creation, deletion and initial use)
turbo intruder常用脚本
Wechat forum exchange applet system graduation design completion (4) opening report
leetcode-520. 检测大写字母-js
Network security sqlmap and DVWA explosion
ArcGIS: field assignment_ The attribute table field calculator assigns values to fields based on conditions
Installing vmtools is gray
二叉树(Binary Tree)
微信论坛交流小程序系统毕业设计毕设(5)任务书
Are the microorganisms in the intestines the same as those on the skin?
Adrnoid开发系列(二十五):使用AlertDialog创建各种类型的对话框
[untitled] reprint melting ice - track icedid server with a few simple steps