标题:[求助]why?
取消只看楼主
kingyor
Rank: 1
等 级:新手上路
帖 子:66
专家分:0
注 册:2006-6-4
 问题点数:0 回复次数:0 
[求助]why?
import java.io.*;
import java.lang.String;
public class charApplication{
public static void main(String[] args)
{
OutputStreamWriter osw = null;
try{
osw = new OutputStreamWriter(new FileOutputStream("D:/test.txt"),"Unicode");//这里<-----
}
catch (FileNotFoundException ex){
System.out.println(ex);
}
try{
osw.write("\u00A9\u00BD\u0391\u0392\u0393\u0394\u00f8");
osw.flush();
}
catch(IOException ex){
System.out.println(ex);
}
}
}

我编译时出现
charApplication.java:8: unreported exception java.io.UnsupportedEncodingException; must be caught or declared to be thrown
osw = new OutputStreamWriter(new FileOutputStream("D:/test.txt"),"Unicode");
什么意思啊?
搜索更多相关主题的帖子: why 
2006-10-25 17:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-98699-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.292429 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved