且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将arraylist的值分配给Thread Array

更新时间:2023-12-01 08:16:52

您可以将arraylist设为静态的全局公共项,并让每个线程访问它自己的索引在那个数组中.

编辑================

再一次,我不明白为什么将它评为1.这是一次诚实的尝试,目的是使您指出正确的方向.当我没有时间/渴望编写和测试它时,我将不提供代码.
You could make the arraylist a static globally public item, and just let each thread access it''s own index in that array.

EDIT ================

Once again, I don''t understand why this was voted a 1. It was an honest attempt at getting you pointed in the right direction. I''m not going to provide code when I don''t have time/desire to write and test it.