Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

charArrayWriter

 
yasir badshah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!