package com.gxx.threads.study.test13; /** * 测试类-测试线程优先级的规则性,随机性,速度 * @author Gxx */ public class Test { /** * main方法 * @param args */ public static void main(String[] args) { System.out.println("main 开始"); MyThread thread1 = new MyThread("线程1", 10); MyThread thread2 = new MyThread("线程2", 1); MyThread thread3 = new MyThread("线程3", 10); MyThread thread4 = new MyThread("线程4", 1); MyThread thread5 = new MyThread("线程5", 10); MyThread thread6 = new MyThread("线程6", 1); MyThread thread7 = new MyThread("线程7", 10); MyThread thread8 = new MyThread("线程8", 1); MyThread thread9 = new MyThread("线程9", 10); MyThread thread10 = new MyThread("线程10", 1); thread1.start(); thread2.start(); thread3.start(); thread4.start(); thread5.start(); thread6.start(); thread7.start(); thread8.start(); thread9.start(); thread10.start(); System.out.println("main 结束"); } }