Magallon Juan-Qui Inti Sandino
Algoritmos y Estructuras de Datos
*/
import java.io.*;
public class EscribeArch
{
public static void main(String args[])
{
FileWriter f=null;
PrintWriter sal=null;
try
{
f = new FileWriter("inti.txt");
sal = new PrintWriter(f);
}
catch (IOException e)
{
System.out.println("ERROR AL CREAR EL ARCHIVO");
}
for (int i=0; i<20; i++)
sal.println("Inti Sandino linea #"+i);
try
{
sal.close( );
f.close( );
}
catch(IOException e)
{System.out.println("Error");};
System.out.println("Listo!!! ARCHIVO CREADO");
}
}
![]() |
![]() |