Salve a tutti..ho scritto questa programma che scrive sul file ok.txt le due stringhe (a e b):l'unica cosa è che vorrei farle comparire su due righe distinte, mentre il programma così scritto me le scrive in sequenza..come posso fare?Grazie.
import java.io.*;
public class Scrivere
{
public static void main (String args[]) throws IOException
{
FileWriter fw=new FileWriter ("ok.txt");
String a="Questa stringa deve comparire sulla prima riga";
String b="Questa stringa deve comparire sulla seconda riga";
fw.write(a,0,46);
fw.write(b,0,48);
fw.close();
}
}