class="java" name="code">import java.io.File; public class Digui { public static void main(String[] args) { String fileName = "d:" + File.separator + "Finance"; File f = new File(fileName); print(f); } public static void print(File f) { if (f != null) { if (f.isDirectory()) { File[] fileArray = f.listFiles(); if (fileArray != null) { for (int i = 0; i < fileArray.length; i++) { print(fileArray[i]); } } } else { System.out.println(f); } } } }