summaryrefslogtreecommitdiffstats
path: root/test/Java/java_version_image/src4/NestedExample.java
blob: 531f2e9e389a0f0896a36da1d1a73989a5fbdf3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// import java.util.*;

public class NestedExample
{
        public NestedExample()
        {
                new Thread() {
                        public void start()
                        {
                                new Thread() {
                                        public void start()
                                        {
                                                try {Thread.sleep(200);}
                                                catch (Exception e) {}
                                        }
                                };
                                while (true)
                                {
                                        try {Thread.sleep(200);}
                                        catch (Exception e) {}
                                }
                        }
                };
        }


        public static void main(String argv[])
        {
                new NestedExample();
        }
}