-
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
-
依托CStatic类,改造的控件,可以绘出很漂亮的数字标尺,标准类封装,方便用户调用和二次开发与改造。谢谢使用~...
依托CStatic类,改造的控件,可以绘出很漂亮的数字标尺,标准类封装,方便用户调用和二次开发与改造。谢谢使用~-Relying on CStatic class, the transformation of control, you can draw very beautiful digital gauge, the standard type of packaging, user-friendly call and secondary development and transformation. Thank you, use ~
- 2022-08-22 12:08:51下载
- 积分:1
-
显示位图图象的静态控件
显示位图图象的静态控件-The static control which display picture
- 2022-02-27 07:49:55下载
- 积分:1
-
用于安装您的PC的端口使用scport!
scport for monting your pc s port usage!
- 2023-08-05 15:50:03下载
- 积分:1
-
XML document processing : a simple XML document processing control
XML文档处理:一个简明的XML文档处理控制-XML document processing : a simple XML document processing control
- 2022-02-02 19:25:39下载
- 积分:1
-
vc++ 漂亮的mfc静态文本控件,可以做成多种形式的文本!
vc++ 漂亮的mfc静态文本控件,可以做成多种形式的文本!-vc++ beautiful mfc static text controls, can cause various forms of text!
- 2023-04-02 00:50:04下载
- 积分:1
-
透明的static组件,基于MFC源代码
透明的static组件,基于MFC源代码-transparent static components, based on the MFC source code
- 2022-08-21 11:53:01下载
- 积分:1
-
时钟模块之一:二进制转BCD码verilog源代码FPGA advantage编程环境...
时钟模块之一:二进制转BCD码verilog源代码FPGA advantage编程环境-clock module : BCD switch binary source code Verilog FPGA advantage programming environment
- 2023-09-08 18:40:03下载
- 积分:1
-
delphi用于财务货币的格式化显示控件
delphi用于财务货币的格式化显示控件-delphi for financial currency formatting controls revealed
- 2022-08-05 16:57:40下载
- 积分:1
-
我写了一个界面友好的时钟继承CStatic类,包装水平。
一个本人写得界面友好的时钟,时钟继承CStatic类,封装为ocx控件。-I write a friendly interface clocks succession CStatic category, Packaging for ocx control.
- 2022-05-09 00:09:09下载
- 积分:1