Created
October 1, 2013 20:02
-
-
Save matiasfha/6784244 to your computer and use it in GitHub Desktop.
ejemplo java escritura archivo texto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try{ | |
FileWriter fw = new FileWriter("salida.txt"); | |
BufferedWriter bw = new BufferedWriter(fw); | |
PrintWriter salida = new PrintWriter(bw); | |
salida.println("Primera linea"); | |
salida.close(); | |
//Modo append | |
bw = new BufferedWriter(new FileWriter("salida.txt",true)); | |
salida.print("Segunda Linea"); | |
double b = 123.45; | |
salida.prinln(b); | |
salida.close(); | |
}catch(java.io.IOException e){} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment