![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
lmq_zzz
这个作者很懒,什么都没留下…
展开
-
IO类
为了保证Java程序的跨平台性,做文件操作时最好不要直接用“D:\\1.txt”,因为不同操作系统的路径分隔符不同(比如:windows是\ Linux是/),如果直接使用“D:\\1.txt”那么该程序到Linux平台则无法直接运行,所以最好使用File.separator代替。 File f = new File("D:\\1.txt"); //最好用File ...原创 2018-06-15 20:36:33 · 123 阅读 · 0 评论 -
Java解析Properties
1、使用java.util.Properties类的load()方法 示例: InputStream in = new BufferedInputStream(new FileInputStream(name)); Properties p = new Properties(); p.load(in); 2、使用java.util.ResourceBundle类的getBundle()方法...转载 2018-06-24 16:46:44 · 944 阅读 · 0 评论