Completed reading in the CSV #1

Merged
AustrianToast merged 12 commits from Feature/import_csv into dev 2023-03-17 15:31:57 +01:00
Showing only changes of commit 8b3a283118 - Show all commits

View File

@ -9,22 +9,19 @@ public class Matrix {
}
public String[] importCSV(String file) {
String[] result = null;
String line;
String[] result = new String[100];
try {
BufferedReader br = new BufferedReader(new FileReader(file));
line = br.readLine();
while (line != null) {
result = line.trim().split(";");
while (br.readLine() != null) {
result = br.readLine().trim().split(";");
}
br.close();
} catch (FileNotFoundException e) {
e.getStackTrace();
e.printStackTrace();
} catch (IOException e) {
e.getStackTrace();
e.printStackTrace();
}
return result;
}