如何将存储在数组中的文件发送给其他类?
我已经尝试过此代码,但无法正常工作。

public class abc {
    ....
    String [] indexFiles = new String[100];

    public abc (){
       indexFiles [0]=image1.txt;
       indexFiles [1]=image1.txt;
       ....
       draw = new drawing (indexFiles(0)); // I got error in this code
       draw = new drawing (indexFiles.get(0)); // I also tried this code but it give me error as well.
    }

}

最佳答案

使用

indexFiles[0]

09-26 17:57