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