Now after making modifications in some attributes i want to write it back in the same out.txt instead of writing in a seperate file of creating a seperate file.
import java.io.*;
import java.util.*;
public class
Test
{
public static void main(
String[] args)
{
try
{
String fileName="c:\\out.txt";
if ((fileName == null) || (fileName == ""))
throw new IllegalArgumentException();
String line;
ArrayList file = new ArrayList();
FileReader fr = new FileReader(fileName);
BufferedReader in = new BufferedReader(fr);
if (!in.ready())
throw new IOException();
while ((line = in.readLine()) != null) {
file.add(line);
}
in.close();
}
catch (IOException e)
{
System.out.println(e);
}
}
}