(String[] args)
| 1 | class Threads { |
| 2 | |
| 3 | public static void main(String[] args) { |
| 4 | Thread t = new Thread(new Runnable() { |
| 5 | @Override |
| 6 | public void run() { |
| 7 | foo(); |
| 8 | } |
| 9 | }); |
| 10 | t.start(); |
| 11 | Thread t2 = Thread.currentThread(); |
| 12 | } |
| 13 | |
| 14 | static void foo() { |
| 15 | Object o = new Object(); |