AtomDemo.java 484 B

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