-
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
-
windows 平台,数字时钟源代码,vc++6.0
windows 平台,数字时钟源代码,vc++6.0-windows platform, digital clock source code, vc++ 6.0
- 2023-04-19 11:35:04下载
- 积分:1
-
本代码例子提供了一个很好的模拟仪表显示的自绘制控件。
本代码例子提供了一个很好的模拟仪表显示的自绘制控件。-the example code provided a good simulation of the show since Instrumentation Drawing controls.
- 2023-04-09 01:45:03下载
- 积分:1
-
由CStatic派生的柱状图控制演示程序源码,单击添加按钮,便会看到效果,还可以设置显示方式!...
由CStatic派生的柱状图控制演示程序源码,单击添加按钮,便会看到效果,还可以设置显示方式!-CStatic derived from the control column demo program source code, click the Add button, they will see results, but also can set display mode!
- 2022-10-24 17:10:03下载
- 积分:1
-
ftp客户端实现 ftp客户端实现
ftp客户端实现 ftp客户端实现-ftp client to achieve the c lient achieve ftp ftp client achieve customer households-realization
- 2023-04-15 10:15:03下载
- 积分:1
-
FillCD Directory portfolio can achieve maximum utilization of optical discs. The...
FillCD目录组合可以实现光盘的最大利用率。刻录光盘是必不可少的工具。
- 2022-03-07 19:08:25下载
- 积分:1
-
是一个能够在窗体上实现超级链接的程序,或者发送email;
是一个能够在窗体上实现超级链接的程序,或者发送email;-is one in the form of hyperlinks to achieve the procedure, or send email;
- 2022-02-01 00:02:19下载
- 积分:1
-
圆形时间选择控件。
圆形时间选择控件。-round timing controls.
- 2022-12-20 11:45:03下载
- 积分:1
-
显示文件名的静态控件。对长文件名可以把中间的一些路径显示为省略号...
显示文件名的静态控件。对长文件名可以把中间的一些路径显示为省略号-The static control which display filename
- 2023-05-17 06:40:03下载
- 积分:1
-
卡尔曼滤波器(kalman filter)设计,MATLAB语言实现。包括了详细的算法文档,通过室温控制说明具体设计过程。是学习kalman的一个好例程...
卡尔曼滤波器(kalman filter)设计,MATLAB语言实现。包括了详细的算法文档,通过室温控制说明具体设计过程。是学习kalman的一个好例程-Kalman filter (Kalman filter) design, MATLAB language. Include a detailed algorithm documents, room temperature control through specify the design process. Tracking the study is a good routines
- 2023-04-17 06:05:04下载
- 积分:1