I am trying to get my java program to write to a file so...
I have this at the top:
import java.util.Scanner;
import java.io.BufferedWriter;
import java.io.FileWriter;
Then have this later:
System.out.println ("Please enter the name of the file that you want to create:");
BufferedWriter file = new BufferedWriter(new FileWriter(input.nextLine()));
Then I want to add aditional info to the file (it will be saved as an html file):
file.write ("<p> " + info + "</p>");
I believe it has something to do with file.write but idk please tell me
Thanks