ITeye博客

一段代码明白了面向对象与线程的两种方式

BestUpon · 2012-05-03 13:46 · JAVA 底层 · Android · 移动开发 · Markdown

public class ThreadTest {
	public static void main(String[] args) {
		new Thread(new Runnable() {
			@Override
			public void run() {
				System.out.println("result:Runnable...");
			}
		}) {
			public void run() {
				System.out.println("result:Thread...");
			};
		}.start();
	}
}

 输出什么结果呢? 自己跑着试试....

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。