File: NestedExample.java

package info (click to toggle)
scons 4.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,476 kB
  • sloc: xml: 199,987; python: 133,450; javascript: 4,671; sh: 1,007; perl: 493; ruby: 229; ansic: 180; java: 139; makefile: 134; f90: 108; cpp: 71; yacc: 39; lex: 10
file content (31 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (2)
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();
        }
}