public class Mass_Reading
{
public static void main(String args[]) throws Exception
{
CSVReader reader = new CSVReader(new FileReader("Test_Graphs.csv"));
List myEntries = reader.readAll();
//System.out.println(myEntries);
myEntries = new ArrayList<String>(myEntries);
//System.out.println(myEntries);
Object[] data = myEntries.toArray();
System.out.println(data[0] + "");
}
}
I'm trying to read a .csv file in and get the data into a workable data type. When read in it starts as a List of String Objects. In my code above I'm trying to get it to an array of Strings. My main hangup is getting the String Object to a String Literal. I keep getting the error java.lang.Object[] cannot be converted to java.lang.String[]. The code above compiles, but still does not achieve my goal. When it prints I still get a String Object. Thanks for any suggestions.