摘要: 一、StringBuffer&StringBuilder的作用 当我们字符串拼接时候:需要在内存中不断new 新的String对象,会造成大量的内存浪费和过多的GC,所以引入StringBulider和StringBuffer string str = "123"; for (int i = 0; 阅读全文
posted @ 2020-05-18 17:15 可可的私房菜 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 问题1:IO流一定要关闭么? 问题2:字符流和字节流使用上有什么区别? 问题3:IO流分哪几种? 一、思维导图 前言:IO流都为对文件操作,所以IO流都需要使用File类 String filePath="/Users/text.txt"; File file = new File(filePath 阅读全文
posted @ 2020-05-18 09:59 可可的私房菜 阅读(159) 评论(0) 推荐(0) 编辑