-
-
Save exavier/0d72b86d46358cc923b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package family; | |
import java.io.PrintWriter; | |
import java.io.FileOutputStream; | |
import java.io.FileNotFoundException; | |
public class File { | |
public void files() throws Exception | |
{ | |
PrintWriter zzz = null; | |
try | |
{ | |
WorkPeople workPeople = new WorkPeople(); | |
zzz = new PrintWriter(new FileOutputStream("D:\\аттестация - результаты\\" + workPeople.getMyName() + ".txt")); | |
} | |
catch(FileNotFoundException e) | |
{ | |
WorkPeople workPeople = new WorkPeople(); | |
System.out.println("Ошибка открытия файла" + workPeople.getMyName() + ".txt"); | |
System.exit(0); | |
} | |
WorkPeople workPeople = new WorkPeople(); | |
zzz.println(workPeople.getMyName()); | |
zzz.close(); | |
System.out.println(workPeople.getMyName()); | |
System.out.println("Программа завершена"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment