Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package zzTests;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.PrintWriter;
- import java.util.Scanner;
- public class Zadanie {
- public static void main(String[] args) throws FileNotFoundException{
- String sFile = "config.txt";
- File file = new File(sFile);
- PrintWriter pw = new PrintWriter(file);
- Scanner in = new Scanner(System.in);
- Scanner out = new Scanner(file);
- pw.print(in.nextLine());
- pw.close();
- in.close();
- while(out.hasNextLine()){
- System.out.println(out.nextLine());
- }
- out.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment