[Html]/* create two threads and run them alternately with the main thread. */class E implements Runnable {public void run () {for (int x = 0; x <10; x ++) {System. out. println (Thread. currentThread (). getName () + "I am:" + x) ;}} public class Threade_15 {public static void main (String [] args) {E ee = new E (); thread t1 = new Thread (ee); Thread t2 = new Thread (ee); t1.start (); t2.start (); for (int x = 0; x <10; x ++) {System. out. println (Thread. currentThread (). getName () + "I am:" + x) ;}} applet principle: Pass the subclass object of the Runnable interface as an actual parameter to the constructor of the Thread class. Why should we pass the subclass object of the Runnable interface to the constructor of Thread. Because the custom run method belongs to a subclass object of the Runnable interface. Therefore, let the thread specify the run method of the specified object. You must specify the object to which the run method belongs. Call the start method of the Thread class to enable the Thread and call the run method of the subclass of the Runnable interface.