本帖最后由 Miss小强 于 2013-5-12 10:26 编辑
- new Thread(new Runnable() {
- @Override
- public void run() {
- while (true) {
- //22222222
- System.out.println(Thread.currentThread().getName()
- + "thread ...");
- }
- }
- }) {
- @Override
- public void run() {
- while (true) {
- //1111
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println(Thread.currentThread().getName()
- + "haha");
- }
- }
- }.start();
复制代码 我知道结果是执行11111处的代码,该怎么解析呢? |
|