---
title: "一段代码明白了面向对象与线程的两种方式"
author: "BestUpon"
date: "2012-05-03T13:46:50Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2012-05-03T13:46:50Z"
id: 1508548
url: "https://bestupon.iteye.com/blog/1508548"
---

```
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();
	}
}
```

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