First, you need to initialize the array like
File[] file = new File[list.size()];
Now, you need to access the indexes of the array, like
for(int i = 0;i<fileList.size();i++) {
file[i] = new File(list.get(i));
}
More Related Contents:
- How to move elements of Java ArrayList to file in java [closed]
- How to convert ArrayList to String[][]?
- Get ArrayList entry of a HashMap Entry [closed]
- How can I avoid ArrayIndexOutOfBoundsException or IndexOutOfBoundsException? [duplicate]
- Downloading a file from spring controllers
- How to construct a relative path in Java from two absolute paths (or URLs)?
- Copying files from one directory to another in Java
- How to avoid java.util.ConcurrentModificationException when iterating through and removing elements from an ArrayList
- Reliable File.renameTo() alternative on Windows?
- How to use an array list in Java?
- list.clear() vs list = new ArrayList(); [duplicate]
- make arrayList.toArray() return more specific types
- List versus ArrayList as reference type?
- Remove Item from ArrayList
- Understand Arraylist IndexOutOfBoundsException in Android
- How can I calculate the difference between two ArrayLists?
- Eclipse reading stdin (System.in) from a file
- How to get a random line of a text file in Java?
- Time complexity for java ArrayList
- Java File – Open A File And Write To It [closed]
- Java ArrayList replace at specific index
- Most efficient way to see if an ArrayList contains an object in Java
- How can I get the count of line in a file in an efficient way? [duplicate]
- ArrayList contains case sensitivity
- What is the Simplest Way to Reverse an ArrayList?
- Create an ArrayList with multiple object types?
- Java ArrayList Contain always return false although it contain the same value
- Sorting ArrayList of Objects by Object attribute
- How to pass ArrayList using putStringArrayListExtra()
- What is the difference between ArrayList.clear() and ArrayList.removeAll()?