Created
May 22, 2020 19:04
-
-
Save kryvoboker/6047eac1625ffd7831d7e13be022aa77 to your computer and use it in GitHub Desktop.
HomeWork8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
File file = new File("."); | |
showKatalog(file); | |
} | |
public static void showKatalog(File folder) { | |
if (folder.isDirectory()) { | |
File[] files = folder.listFiles(); | |
for (int i = 0; i < files.length; i++) { | |
showKatalog(files[i]); | |
} | |
System.out.println("Folder - " + folder.getParent()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment