I am currently trying to display a csv file called "Haha2" using csv open in Java. Unfortunately when I print the arraylist I get the hashcode and not the numbers that are contained in the file.
I have tried the .get() method and the .toArray() and .toString methods but I am still only able to print out the hashcode.
Here's my code:
import au.com.bytecode.opencsv.*;
import java.io.*;
import java.util.*;
public class playlist{
public static void main (String args()) throws IOException {
CSVReader reader = new CSVReader(new FileReader("Haha2.asc"),';', '"',29);
List <String[]> data = new ArrayList <String[]>();
data = reader.readAll();
System.out.println(data);
}
}
dataand then for each element you again have to loop for all elements in eachString[].