Mine
public java v1 · immutableimport java.io.*;public class ListDirs { public static void ListDirectories(String path) { File thisPath = new File(path); File[] fileList = thisPath.listFiles(); for(int i = 0; i < fileList.length; i++) { if (fileList[i].isDirectory() ) { System.out.println("Dir :" + fileList[i].getName() ); ListDirectories(path + fileList[i].getName()); }// if } // for } public static void main(String args[]) { System.out.println("Hello world"); ListDirectories("C:\\"); }}