@@ -0,0 +1,752 @@
+package com.phpdragon.study.thread;%0A%0Apublic class ThreadYield %7B%0A    public static void main(String%5B%5D args) %7B%0A        ThreadYield threadYield = new ThreadYield();%0A        Thread t1 = threadYield.new MyThread1();%0A        Thread t2 = new Thread(threadYield.new MyRunnable());%0A%0A        t2.start();%0A        t1.start();%0A    %7D%0A%0A    class MyThread1 extends Thread %7B%0A        public void run() %7B%0A            for (int i = 0; i %3C 10; i++) %7B%0A                System.out.println(%22%E7%BA%BF%E7%A8%8B1%E7%AC%AC%22 + i + %22%E6%AC%A1%E6%89%A7%E8%A1%8C%EF%BC%81%22);%0A            %7D%0A        %7D%0A    %7D%0A%0A    class MyRunnable implements Runnable %7B%0A        public void run() %7B%0A            for (int i = 0; i %3C 10; i++) %7B%0A                System.out.println(%22%E7%BA%BF%E7%A8%8B2%E7%AC%AC%22 + i + %22%E6%AC%A1%E6%89%A7%E8%A1%8C%EF%BC%81%22);%0A                Thread.yield();%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Add thread yield example