AtomDemo.java 361 B

1234567891011121314151617
  1. package J20250802.demo02;
  2. /**
  3. * @author WanJl
  4. * @version 1.0
  5. * @title AtomDemo
  6. * @description
  7. * @create 2025/8/2
  8. */
  9. public class AtomDemo {
  10. public static void main(String[] args) {
  11. MyAtomThread atomThread=new MyAtomThread();
  12. for (int i = 0; i < 100; i++) {
  13. new Thread(atomThread,"线程"+(i+1)).start();
  14. }
  15. }
  16. }