Thanks john for your reply but the below code doesnt working for me.
according to me it shd write "owdy folks" but it is not.. i m not able to trace the problem. i thought my understanding for printWriter is not correct.
import java.io.*;
class Writer3
{
public static void main(
String[] args)
{
try{
File file=new File("testnitintxt.txt");
//FileWriter fw=new FileWriter(file);
PrintWriter pw=new PrintWriter(file);
pw.println("howdy");
pw.println("folks");
pw.write("howdy");
pw.write("folks");
}
catch(IOException e){}
}
}
Regards,
nitn