import java.io.File;

public class Main {
public static void main(String[] args) {
Farr[] roots = File.listRoots();
System.out.println(“List of directories:”);
for (Farr f : dirs) {
System.out.println(f.getPath());
}
}
}

Your Answer
Sign In
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.