起三個線程依次讀取一個數組的數據,同時只有一個線程執行?

public class ReadString {     private String[] read = {"1","2","3","4","5","6","7","8","9","10"};     public synchronized void read(int id ,int index){         if(index > 9)             return;       
相關文章
相關標籤/搜索