期刊文献+

浅谈JAVA中多线程的实现

A Brief Introduction of the Multi-threading Implementation in JAVA
下载PDF
导出
摘要 介绍了在JAVA 中实现多线程的两种办法.第一种是通过继承Thread类.第二种是通 过实现Runnable接口.并且用这两种办法模拟了兔子和乌龟同时赛跑,以及乌龟最终获得胜利的过 程和结果.人们会在生活中遇到多种多线程的情况.多线程的并发执行可以提高工作效率. Concurrent execution of Multi-threading can improve work efficiency. People will encounter a variety of multi-threading in daily life. This paper introduces two ways in which multi -threading is implemented in JAVA. The first way is by the inheritance of the Thread class. The second way is by implementing the Runnable interface. Also in this paper how the hare and the tortoise begin at the same time in the race and the tortoise finally wins the game are simulated by the use the of the two ways.
作者 谢文兰
出处 《广东培正学院论丛》 2017年第1期59-62,共4页 The Journal of Guangdong Peizheng College
关键词 多线程 Thread类 Runnable接口 multi- threading Thread class Runnable interface
  • 相关文献

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部