Commit 588684b2 by Patryk Czarnik

Program WypiszDane nieobiektowo

parent 41567cc7
......@@ -2,7 +2,6 @@ package emps.v1_nieobiektowo;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
public class WypiszDane {
......@@ -13,13 +12,12 @@ public class WypiszDane {
while(scanner.hasNextLine()) {
String linia = scanner.nextLine();
String[] t = linia.split(";");
System.out.println(Arrays.toString(t));
// wypisujemy tylko wybrane informacje:
System.out.println(t[1] + " " + t[2] + " zarabia " + t[4]);
}
} catch(FileNotFoundException e) {
e.printStackTrace();
}
}
}
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