package alx.p40_io;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
 
public class ZapiszJakisPlik2 {
 
    public static void main(String[] args) {
    	System.out.println("Zaczynam");
        try {
            PrintWriter out = new PrintWriter("plik2.txt");
            
            out.println("Ala ma kota");
            out.println("Ola ma psa");
            
            out.append("pies").append(" kot").append(" chomik").println();
            
            out.close();
            System.out.println("Gotowe");
            
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
