可能有N种吧, 看看io吧
try {
String s = "test1\r\ntest2";
FileOutputStream out = new FileOutputStream("c:/test.txt");
out.write(s.getBytes());
out.close();
}
catch (IOException e) {
}
try {
String s = "test1\r\ntest2";
FileOutputStream out = new FileOutputStream("c:/test.txt");
out.write(s.getBytes());
out.close();
}
catch (IOException e) {
}
解决方案 »
- 帮忙看下这段读取字节流的代码哪里出问题了
- postfix increment expression
- 模拟光标
- 请问哪里可以找到Notes API for java ?急需!!!
- 在Java里怎么播放声音文件,?
- 关于Comparator接口的使用
- 菜鸟级人物有问题要问。希望走过、路过的都进来帮看看吧。
- 谁知道像qq中我的好友,我的群那样的按钮(一按就会像上或向下跑)用java怎么做
- 在applet中的图片显示问题。
- 兄弟们:我想不通:为什么微软的CLR就是比JVM快那么多?真是见鬼了!是因为微软没有公开WINDOWS的源代码吗?那为什么在UNIX上,JVM一样的
- 如何将STRING "2003-11-01 11:12:23" 转为系统时间long。急急~!
- 关于在jb中新建XML!
Write a portion of a String.其他流类里也有相似的方法