-
public class Server extends Thread { Client client int counter public Server(Cli...
public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter < 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter >= 10") } public static void main(String[] args) { Client c = new Client() Server s = new Server(c) c.start() s.start() } } class Client extends Thread { Vector queue public Client() { this.queue = new Vector() } public void run() { while (true) { if (! (queue.size() == 0)) { processNextElement() } } } private void processNextElement() { Object next = queue.elementAt(0) queue.removeElementAt(0) System.out.println(next)-public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter lt; 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter gt;= 10") } p
- 2022-02-21 05:44:37下载
- 积分:1
-
实现托盘功能,在通知区域添加图标,并且在程序运行的开始阶段隐藏...
实现托盘功能,在通知区域添加图标,并且在程序运行的开始阶段隐藏-Function of the realization of tray, add the icon in the notification area, and run in the beginning of the hidden
- 2022-05-24 07:01:46下载
- 积分:1
-
一个以滚动方式进行显示的时钟控件
一个以滚动方式进行显示的时钟控件-a way to roll the clock showed Controls
- 2022-05-19 06:36:42下载
- 积分:1
-
显示位图图象的静态控件
显示位图图象的静态控件-The static control which display picture
- 2022-02-27 07:49:55下载
- 积分:1
-
datasheetEM78 Series MCU total of 47 (45 and EM78P447 the 1,458 is 48) directive...
数据表EM78系列单片机共47个(45和EM78P447的1458是48)指令,宽度为13。每一个指令码可分为两部分,第一部分是函数的运算指令码(OPCODE),第二部分是当需要运算参数时,其中计算码(操作数)。而教学类型大致可分为以下四类:
- 2022-04-22 15:12:18下载
- 积分:1
-
是一个能够在窗体上实现超级链接的程序,或者发送email;
是一个能够在窗体上实现超级链接的程序,或者发送email;-is one in the form of hyperlinks to achieve the procedure, or send email;
- 2022-02-01 00:02:19下载
- 积分:1
-
expansion CStatic controls, making rigid controls CStatic illustrations, and to...
扩展CStatic控件,使得呆板的CStatic控件图文并茂,并能够动起来!-expansion CStatic controls, making rigid controls CStatic illustrations, and to take action!
- 2022-03-03 04:16:48下载
- 积分:1
-
显示弯曲移动文字的静态控件
显示弯曲移动文字的静态控件-The static contorl which display curve text
- 2022-02-02 08:25:32下载
- 积分:1
-
用数字二极管显示数字时间、浮点数、整数的控件
用数字二极管显示数字时间、浮点数、整数的控件-Digital LED display with digital time, floating point, integer control
- 2022-02-02 22:33:39下载
- 积分:1
-
计算机接口软件。大多数学生看的很好。我忘记了…
计算机接口的课件。望广大学生好好用。忘记万毫我。-Computer Interface Software. The majority of students look properly. I forget the 10,000 coin.
- 2022-10-16 16:05:03下载
- 积分:1