add Exception Examples #1

Merged
MehrdadShirvani merged 3 commits from exceptions into main 2026-05-10 12:22:37 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 5c1e298cec - Show all commits
@@ -50,7 +50,7 @@ public class FileService {
public static String writeFile(UserEntity user) {
FileWriter fw = new FileWriter("D:\\ExceptionHandling\\userInformation.txt", true);
FileWriter fw = new FileWriter("userInformation.txt", true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(user.toString());
@@ -61,7 +61,7 @@ public class FileService {
public static void readFile() {
FileReader file = new FileReader("D:\\ExceptionHandling\\userInformation.txt");
FileReader file = new FileReader("userInformation.txt");
BufferedReader fileInput = new BufferedReader(file);
+1
View File
@@ -0,0 +1 @@
HELLO!