-
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
-
vc 的编写过和是你学习的原因,请你学习
vc 的编写过和是你学习的原因,请你学习-vc over and the preparation is the reason for you to learn, you learn
- 2022-04-16 05:35:45下载
- 积分:1
-
矩阵编码的遗传算法可以将普通遗传算法编码的不可用的编码个体转变为合法的个体,效果明显优于普通遗传算法....
矩阵编码的遗传算法可以将普通遗传算法编码的不可用的编码个体转变为合法的个体,效果明显优于普通遗传算法.-matrix of genetic coding algorithm can be common genetic coding algorithm used in the non-coding individual change as a legitimate 000 CARICOM, the effect was better than ordinary genetic algorithm.
- 2023-08-25 00:50:04下载
- 积分:1
-
这是小弟编写的一个些小程序,如果有个想学JAVA,这是一个很好的例子,希望有识之士能够提出看法,为我们的JAVA事业更上一层楼...
这是小弟编写的一个些小程序,如果有个想学JAVA,这是一个很好的例子,希望有识之士能够提出看法,为我们的JAVA事业更上一层楼-This is the younger brother of a bit of preparation procedures, if there were, like Java, which is a very good example, insight hope to put forward their views to our careers JAVA
- 2022-03-23 15:00:25下载
- 积分:1
-
vc++ 漂亮的mfc静态文本控件,可以做成多种形式的文本!
vc++ 漂亮的mfc静态文本控件,可以做成多种形式的文本!-vc++ beautiful mfc static text controls, can cause various forms of text!
- 2023-07-04 11:30:03下载
- 积分:1
-
图形绘制源代码,可以动态绘制正选曲线图形。
图形绘制源代码,可以动态绘制正选曲线图形。-Rendering the source code, you can draw are selected curves dynamic graphics.
- 2022-01-26 07:30:27下载
- 积分:1
-
超级链接
超级链接- Super links
- 2023-07-29 03:00:03下载
- 积分:1
-
CHyperlink:
如果想在C++编写的Windows程序中实现hyperlink,试一试这个类吧,只需要几行代码就可以实现超链接控制,可以启动浏览器和...
CHyperlink:
如果想在C++编写的Windows程序中实现hyperlink,试一试这个类吧,只需要几行代码就可以实现超链接控制,可以启动浏览器和电子邮件的客户端程序。其他特性包括:设置前景色,设置背景色,设置高亮色,设置字体,设置字体大小,定制光标,透明效果等-CHyperlink : If you want to prepare for Windows C procedures to achieve hyperlink, to test this type bar, need only a few lines of code can be achieved hyperlink control, can be activated browser and e-mail client program. Other features include : Setting up the foreground color, background color set, set high Luminance, installed fonts, font sizes set up, customized cursor. transparent effects
- 2022-06-22 05:26:03下载
- 积分:1
-
关于给初学者介绍SDK编程
关于给初学者介绍SDK编程- About gives the beginner to introduce SDK programs
- 2022-12-18 22:50:03下载
- 积分:1
-
hehe ,又有新的了,其实我也忘了什么编的了,但是我不想打开看看了,想看的,近来打开看看吧!...
hehe ,又有新的了,其实我也忘了什么编的了,但是我不想打开看看了,想看的,近来打开看看吧!-hehe, there"s a new, in fact, I have already forgotten what series, but I do not want to see an open, watch the recently opened see!
- 2023-04-24 07:20:03下载
- 积分:1