You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
308 B
Java
13 lines
308 B
Java
5 years ago
|
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();
|
||
|
}
|
||
|
}
|