ITPub博客

首页 > 应用开发 > > 为什么打印出来都是??号,文件就是Txt啊

为什么打印出来都是??号,文件就是Txt啊

作者:lihui48 时间:2019-09-24 13:54:09 0 删除 编辑

    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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    108
  • 访问量
    689