java中有几种方法可以实现一个线程?用什么关键字修饰同步方法? stop()和suspend()方

[复制链接]
查看11 | 回复1 | 2011-11-11 06:26:33 | 显示全部楼层 |阅读模式
在Java中,多线程的实现有两种方式:扩展java.lang.Thread类实现java.lang.Runnable接口synchronized 修饰同步方法方法摘要 static Thread currentThread()
返回对当前正在执行的线程对象的引用。ClassLoader getContextClassLoader()
返回该线程的上下文 ClassLoader。long getId()
返回该线程的标识符。String getName()
返回该线程的名称。int getPriority()...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行