-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello.java
More file actions
15 lines (13 loc) · 454 Bytes
/
Copy pathhello.java
File metadata and controls
15 lines (13 loc) · 454 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.io.File;
public class hello {
public static void main(String[] args) {
File currentDir=new File(".");
System.out.println(currentDir);
File[] directories = currentDir.listFiles(File::isDirectory);
if (directories != null) {
for (File directory : directories) {
System.out.println(directory.getName());
}}
System.out.println("HOME environment variable is not set.");
}
}