当前位置:网站首页>【无标题】
【无标题】
2022-06-28 08:31:00 【火创始人】

package com.saint.random;
import java.util.concurrent.ThreadLocalRandom;
/**
* @author Saint
*/
public class ThreadLocalRandomTest {
private static final ThreadLocalRandom RANDOM =
ThreadLocalRandom.current();
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
new SonThread().start();
}
}
private static class SonThread extends Thread {
@Override
public void run() {
System.out.println(Thread.currentThread().getName() + " obtain random value is : " + RANDOM.nextInt(100));
}
}
}
边栏推荐
- Sword finger offer 30 Stack containing min function
- 开户券商怎么选择?网上开户是否安全么?
- PLSQL installation under Windows
- Priority of JS operator
- Quelle est la largeur de bande du serveur de bavardage sonore pour des centaines de millions de personnes en même temps?
- Kubernetes notes and the latest k3s installation introduction
- 如何抑制SiC MOSFET Crosstalk(串扰)?
- How do people over 40 allocate annuity insurance? Which product is more suitable?
- B_QuRT_User_Guide(28)
- 【学习笔记】模拟
猜你喜欢

叠加阶梯图和线图及合并线图和针状图

抗洪救灾,共克时艰,城联优品捐赠10万元爱心物资驰援英德

关于如何在placeholder中使用字体图标

B_QuRT_User_Guide(27)

Introduction, compilation, installation and deployment of Doris learning notes

安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)

Kali Notes(1)

Two tips for block level elements

新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)

抖音服务器带宽有多大,才能供上亿人同时刷?
随机推荐
App automated testing appium Tutorial Part 1 - advanced supplementary content
JS rounding tips
【Go ~ 0到1 】 第一天 6月24 变量,条件判断 循环语句
AI首席架构师8-AICA-高翔 《深入理解和实践飞桨2.0》
Understanding of CUDA, cudnn and tensorrt
小艺人黄鑫洋受邀参加巴黎时装周儿童单元武汉站
IO error in Oracle11g: got minus one from a read call
[introduction to SQL in 10 days] day5+6 consolidated table
Preparation for Oracle 11g RAC deployment on centos7
Why are function templates not partial specialization?
Login common test case
11grac turn off archive log
[introduction to SQL for 10 days] day4 Combined Query & specified selection
Kubernetes notes and the latest k3s installation introduction
广州:金融新活水 文企新机遇
AWS saves data on the cloud (3)
关于如何在placeholder中使用字体图标
yaml json
The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
开户券商怎么选择?网上开户是否安全么?