资源大小: 114KB
发布时间: 2009-12-24
文件格式: doc
下载次数: 4
分享到:

下载地址:

下载地址1
(本站为飞网专业下载站,域名:down.cfei.net)

资源简介:

java多线程机制:例子 1public class Example1{ static Lefthand left;static Righthand right; public static void main(String args[]) { left=new Lefthand(); //创建两个线程。 right=new Righthand(); left.start(); right.start(); }}class Lefthand extends Thread{ public void run() { for(int I=0;I<=5;I++) { System.out.println("I am a student"); try{sleep(500);} catch(InterruptedException e){} } }}class Righthand extends Thread{ public void run() { for(int


飞网下载站,免费下载共享资料,内容涉及教育资源、专业资料、IT资源、娱乐生活、经济管理、办公文书、游戏资料等。