The Java program recursive algorithm lists all subdirectory and files in a directory.

xiaoxiao2021-03-06  41

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

转载请注明原文地址:https://www.9cbs.com/read-78400.html

New Post(0)