Commit 41567cc7 by Patryk Czarnik

split

parent aea10dd8
...@@ -2,6 +2,7 @@ package emps.v1_nieobiektowo; ...@@ -2,6 +2,7 @@ package emps.v1_nieobiektowo;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner; import java.util.Scanner;
public class WypiszDane { public class WypiszDane {
...@@ -11,7 +12,8 @@ public class WypiszDane { ...@@ -11,7 +12,8 @@ public class WypiszDane {
try(Scanner scanner = new Scanner(new File("pliki/emps.csv"))) { try(Scanner scanner = new Scanner(new File("pliki/emps.csv"))) {
while(scanner.hasNextLine()) { while(scanner.hasNextLine()) {
String linia = scanner.nextLine(); String linia = scanner.nextLine();
System.out.println(linia); String[] t = linia.split(";");
System.out.println(Arrays.toString(t));
} }
} catch(FileNotFoundException e) { } catch(FileNotFoundException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment