开发者

Unclosed Character Literal error while writing an integer data in a file

I tried to write Integer data to my file using java.io.FileWriter it shows me

error: unclosed characte开发者_StackOverflow社区r literal

the error line:

        FileWriter fw=new FileWriter("fw.txt");
        fw.write(new char[]{'10','20','30'});
        fw.flush();

but when I try to write an character in the file using character array, there's no problem with the literals.

Trying to Read and Write integer data in a file only using java.io.BufferedReader.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜