Untitled
raw download clone
JAVA
views 21
,
size 678 b
public static void zPliku(String nazwaPliku){
        FileReader czytacz = new FileReader(nazwaPliku);
        BufferedReader bufor = new BufferedReader(czytacz);
        String linia;
        
        while ((linia = bufor.readLine()) != null){
            Scanner skaner = new Scanner(linia);
            skaner.useLocale(Locale.US);
            try{
            String s = skaner.nextLine();
            System.out.println(s + "\n");
            //kontenerKolejka.offerLast(new NaszeDane(i,x,s));
            }catch (InputMismatchException e){
                skaner.skip(linia);
            }
        }
        bufor.close();
        czytacz.close();
    }
close fullscreen
Login or Register to edit or fork this paste. It's free.