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

浙公网安备 33010602011771号