09 2019 档案

摘要:public class Test1 { public static void main(String[] args) { // 统计文件夹大小 long len = getDirLength(new File("D:\\JavaSE")); System.out.println(len + "字节 阅读全文
posted @ 2019-09-16 08:28 码码呼呼 阅读(216) 评论(0) 推荐(0)
摘要:建立一个任意路径的对象求取该路径下文件夹的大小:public class Test { public static void main(String[] args) throws IOException {//创建文件对象 File file = new File("D:\\JavaSE"); Sy 阅读全文
posted @ 2019-09-16 08:25 码码呼呼 阅读(218) 评论(0) 推荐(0)
摘要:Iterator迭代器: List<String> list = new ArrayList<>();list.add("老马");list.add("老王");list.add("老彭"); Iterator<String> iterator = list.iterator();while(ite 阅读全文
posted @ 2019-09-08 14:40 码码呼呼 阅读(359) 评论(0) 推荐(0)