1class s1 extends Thread
2{
3 public void run()
4 {
5 for(int i = 0; i < 3; i++)
6 {
7 System.out.println("A");
8 System.out.println("B");
9 }
10 }
11}
12class Test120 extends Thread
13{
14 public void run()
15 {
16 for(int i = 0; i < 3; i++)
17 {
18 System.out.println("C");
19 System.out.println("D");
20 }
21 }
22 public static void main(String args[])
23 {
24 s1 t1 = new s1();
25 Test120 t2 = new Test120();
26 t1.start();
27 t2.start();
28 }
29}
30