import java.io.*; class a{ public static void main(String[] args)throws Exception{ CharArrayWriter caw=new CharArrayWriter(); caw.write(65); caw.close(); caw.writeTo("c:/yasir.txt"); }} the chararaywriter is not writing in the file,i have tried lot of time,no compile time error& no run time exception so what i do tell me.
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
Hi Yasir, Here's what you need to do:
You have to writeTo a FileWriter to get output to a file when using a writer. Hope this helps Michael SCJP
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher