几个java常量

来源:互联网 发布:朋友圈转发视频软件 编辑:程序博客网 时间:2024/06/01 08:58

System.getProperty("file.separator"));

System.getProperty("path.separator")); 

System.getProperty("line.separator"));

应用实例:

try {                Files.append(lineString,file,Charsets.UTF_8);                Files.append(System.getProperty("line.separator"),file,Charsets.UTF_8);            } catch (IOException e) {                logger.error("写文件时产生异常",e);            }


0 0
原创粉丝点击