Hi,
I have a property variable which contains a pipe seperated String of file names. I want to take that list of file names and create an array of File objects.
My code is
I have a property variable which contains a pipe seperated String of file names. I want to take that list of file names and create an array of File objects.
My code is
Code:
String xsls = properties.getProperty("xsls");
File [] xslfiles = xsls.split("\\|");
[code]
I get the following error:
WebApplicant.java:43: incompatible types
found : java.lang.String[]
required: java.io.File[]
File [] xslfiles = xsls.split("\\|");
^
I understand the error...split returns a string[] and I am trying to stuff it into a File[]. But how can I solve?
Thanks.