正在加载图片...
创建线程2-2 ·要触发一个新线程,使用 start(0方法,如 Mythread t new Mythreadoi 七.s七ayt(); 在调用 start(0方法时,将创建一个新的控 制线程,接着它将调用run方法。 run0方法中的代码定义执行线程所需的功 能。 Designed by Chiyong C200510 Designed by Chiyong,©2005 创建线程 2-2 • 要触发一个新线程,使用 start() 方法,如: Mythread t = new Mythread(); t.start(); • 在调用 start() 方法时,将创建一个新的控 制线程,接着它将调用run() 方法。 • run() 方法中的代码定义执行线程所需的功 能
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有