public static void main(String[] args) { try { FileWriter writer = new FileWriter(“MyFile.txt”, true); writer.write(“Python is best programming language”); writer.write(“\r\n”); // write new line writer.write(“Java is also a good programming language!”); writer.close(); System.out.println(“Success…”); } catch (IOException e) { e.printStackTrace(); }……………..
DO YOU WANT FULL ANSWER THEN TAP ON THE BELOW ATTACHMENT:
public static void main(String[] args) {
try {
FileWriter writer = new FileWriter(“MyFile.txt”, true);
writer.write(“Python is best programming language”);
writer.write(“\r\n”); // write new line
writer.write(“Java is also a good programming language!”);
writer.close();
System.out.println(“Success…”);
} catch (IOException e) {
e.printStackTrace();
}……………..
DO YOU WANT FULL ANSWER THEN TAP ON THE BELOW ATTACHMENT: