Recursive algorithm java program that lists all of the subdirectories and files in a directory: Anonymous Technology Source: Guangzhou net stroke
/ * File Name: DiGui.java Description: Learn the rationter algorithm lists all subdirectories under a directory (including the directory and files below) and files. The recursive function is that the function itself is directly or indirectly called in a function. Author: Chi Qin-Email: cqq1978@Gmail.comhttp: //blog.9cbs.net/cqq*/ import java.io. *; class DiGui {static void getDir (String strPath) throws Exception {try {File f = new File (StrPath); if (f.Indirectory ()) {file [] flist = f.listfiles (); for (int J = 0; j