【发布时间】:2014-01-08 22:49:42
【问题描述】:
我有一个以 utf-8 数据编码的文本文件“abc.txt”,它是来自wikipedia page:(^_^) happy 的一组表情符号
我的代码将此信息从文件中提取到 netbeans 标准输出
我的代码:
public static void main(String[] args) throws FileNotFoundException {
Scanner sc=new Scanner(new File("abc.txt"));
while(sc.hasNext()){
System.out.println(sc.nextLine());
}
}
在 netbeans 中的输出是这样的:
在控制台中,输出为:
这个角色是什么?
我该如何移除它?
【问题讨论】: