اضافة نص إلي ملف موجود باستخدام لغة جافا
- برمجة جافا
- 2022-04-25
- esmailrabie902139106278
الأجوبة
import java.io.FileWriter;
import java.io.IOException;
public class AppendFile {
public static void main(String[] args) {
String path = System.getProperty("user.dir") + "\\src\\test.txt";
String text = "Added text";
try {
FileWriter fw = new FileWriter(path, true);
fw.write(text);
fw.close();
}
catch(IOException e) {
}
}
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال