Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

翻译implements-runnable-vs-extends-thread,并修改了README.md #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dosmile wants to merge 1 commit into giantray:master from dosmile:drtwork
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
stackoverflow-Java-top-qa
stackoverflow-Java-top-qa
=======================
对stackoverflow上Java相关、投票数TOP100的问答进行翻译,欢迎点star,我们会持续更新!!!

Expand Down Expand Up @@ -37,6 +37,7 @@ stackoverflow-Java-top-qa
* [去掉烦人的"!=null"(判空语句](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/avoiding-null-statements-in-java.md)
* [获取完整的堆栈信息](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/get-current-stack-trace-in-java.md)
* [如何通过一行代码初始化ArrayList](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/initialization-of-an-arraylist-in-one-line.md)
* [实现Runnable接口 VS. 继承Thread类](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/implements-runnable-vs-extends-thread.md)

> 网络

Expand Down Expand Up @@ -64,7 +65,6 @@ stackoverflow-Java-top-qa
- [How to avoid Java code in JSP files?](http://stackoverflow.com/questions/3177733/how-to-avoid-java-code-in-jsp-files)
- [Why is executing Java code in comments with certain Unicode characters allowed?](http://stackoverflow.com/questions/30727515/why-is-executing-java-code-in-comments-with-certain-unicode-characters-allowed)
- [Dealing with "java.lang.OutOfMemoryError: PermGen space" error](http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error)
- ["implements Runnable" vs. "extends Thread"](http://stackoverflow.com/questions/541487/implements-runnable-vs-extends-thread)
- [Convert a String to an enum in Java](http://stackoverflow.com/questions/604424/convert-a-string-to-an-enum-in-java)
- [Android SDK installation doesn't find JDK](http://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk)
- [Initialization of an ArrayList in one line](http://stackoverflow.com/questions/1005073/initialization-of-an-arraylist-in-one-line)
Expand Down
23 changes: 23 additions & 0 deletions contents/implements-runnable-vs-extends-thread.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##ɻ��Runnable�ӿ� VS. �̳�Thread�� ��

��Java�У�����ִ������һ�������ַ�ʽ��
��1��ɻ��Runnable�ӿ�
��2���̳�Thread��

һ����ԣ��Ƽ�ʹ�÷�ʽ��1��,��Ҫ�����ڴ��������£����Dz������ر�ȥ��ע�̵߳���Ϊ��Ҳ����ȥ��дThread���е���Ϊ�򷽷�������������ִ��������ѡ�
��x�ʹ�ýӿڵķ�ʽ�ܱ�������һЩ������Ҫ�Ķ�����ͬɦҲ����Ӱ��̳������࣬��ʹ���������


###�����tips��
��1��Runnable��Thread���ǶԵȵĸ���
��Thinking in Java�У������2۹�Runnable���������������Task��Ϊ������
��Java�У�Runnableֻ��һ��������������Ĵ���ζ��ѣ��Ǿ�̬�ĸ����Ҫͨ���߳���ִ�С���Thread������һ�����壬�����;��кܶ���Ϊ���ܹ�����ִ������

��2����������ȷɻ��Ҫ��д��override��һЩ������Ϊɦ����ʹ�ü̳У�������ʹ�ýӿڡ�

��3����Java 5֮ǰ��������Threadȴû������start()���������ܵ����ڴ�й¶��


stackoverflow���ӣ�
http://stackoverflow.com/questions/541487/implements-runnable-vs-extends-thread

AltStyle によって変換されたページ (->オリジナル) /