programming-examples/java/Core_Java/Listing the File System Roots.java

13 lines
308 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
Listing the File System Roots
public static void main(String args[]){
try{
File[] roots = File.listRoots();
for (int i=0; i System.out.println((roots[i]));
}
}
catch (Exception ioe){
ioe.printStackTrace();
}
}