Java 显示目录里面的文件 Java Arrays fill方法-填充short类型 Java 异常finally的使用1 Java 显示目录里面的文件 import java.io.*; public class Main { public static void main(String[] args) { File dir = new File("C:"); String[] children = dir.list(); if (children == null) { System.out.println( "Either dir does not exist or is not a directory"); } else { for (int i=0; i< children.length; i++) { String filename = children[i]; System.out.println(filename); } } } } Java Arrays fill方法-填充short类型 Java 异常finally的使用1