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 f29925a78e - Show all commits

View File

@ -1,4 +1,7 @@
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class Matrix { public class Matrix {
public static void main(String[] args) { public static void main(String[] args) {
@ -7,7 +10,22 @@ public class Matrix {
public String[] importCSV() { public String[] importCSV() {
String[] result = null; String[] result = null;
String line;
try {
BufferedReader br = new BufferedReader(new FileReader(""));
line = br.readLine();
while (line != null) {
result = line.trim().split(";");
}
br.close();
} catch (FileNotFoundException e) {
e.getStackTrace();
} catch (IOException e) {
e.getStackTrace();
}
return result; return result;
} }
} }