I have stored File objects in a vector. Now I which to call the methods of the file objects stored in the Vector. Unlike C++ you cannot simply refer to the vector by index e.g.
vector.getAbsolutPath() nor can you simply call vector.elementAt(i).getAbsolutePath();
I have made a File array = new File[vector.size()]
then pass all the elements from the vector to the file array then parse to file and call the methods. This works but seems somewhat unprofessional and makes the code look untidy.
Also, the program may need to run again without closing making it an issue if the vector changes in size . The File array has a set size already making the program impossible to run a second time without having to close it first.
Is there a way I can access the File methods straight from the Vector?