首页 > 应用开发 > > 为什么打印出来都是??号,文件就是Txt啊
FileInputStream in = new FileInputStream("文本");
InputStreamReader isr = new InputStreamReader(in,"GBK");
int c;
while ((c=in.read())!=-1) {
System.out.print((char)c);
}
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1469/viewspace-3134964/ ,如需转载,请注明出处,否则将追究法律责任。