<html>
<body>
<code>
import java.io.*;
import java.util.*;
class rd2
{
public static void main(
String a []) throws IOException
{
Vector v = new Vector();
FileReader fr1 = new FileReader("c:\\read.txt");
Filewriter fw1 = new FileWriter("c:\\out.txt");
BufferedReader br1 = new BufferedReader(fr1);
PrintWriter pw1 = new PrintWriter(fw1);
String str ;
while ((str = b1.readLine()) ! = null)
{
v.addElement(str);
}
System.out.println(v.size());
for (int i = (v.size() -1) ; i > -1 ; --i)
{
String str1 = (String) v.get(i);
System.out.println(str1);
pw1.println(str1); // I guess here is the problem. It is not printing to file. But last modified TimeStamp is changed.
}
}
</code>
</body>
</html>