Java thread: Thread Scheduling-concession the concession meaning of the thread is to let the currently running thread out of CPU resources, but who does not know, just let out, the thread status back to the runable status. Thread concession uses the Thread. yield () method, and yield () is a static method. The function is to pause the currently executed Thread object and execute other threads. /*** Java thread: Thread Scheduling-concession ** @ author leizhimin 9:02:40 */public class Test {public static void main (String [] args) {Thread t1 = new MyThread1 (); Thread t2 = new Thread (new MyRunnable (); t2.start (); t1.start ();}} class MyThread1 extends Thread {public void run () {for (int I = 0; I <10; I ++) {System. out. println ("thread 1" + I + "times! ") ;}} Class MyRunnable implements Runnable {public void run () {for (int I = 0; I <10; I ++) {System. out. println ("thread 2" + I + "times! "); Thread. yield () ;}} Thread 2 0th executions! Thread 2, 1st executions! Thread 2, 2nd executions! Thread 2, 3rd executions! Thread 1 executes 0th times! Thread 1 executes 1st times! Thread 1 executes 2nd times! Thread 1 executes 3rd Times! Thread 1 executes 4th times! Thread 1 executes 5th times! Thread 1 executes 6th times! Thread 1 executes 7th times! Thread 1 executes 8th times! Thread 1 executes 9th times! Thread 2, 4th executions! Thread 2, 5th executions! Thread 2, 6th executions! Thread 2, 7th executions! Thread 2, 8th executions! Thread 2, 9th executions!