List root directory

 
import java.io.File;

public class ListRoots {
  public static void main(String argh_my_aching_fingers[]) {
    File[] drives = File.listRoots(); // Get list of names
    for (int i = 0; i < drives.length; i++)
      System.out.println(drives[i]); // Print the list
  }
}
  
Home 
  Java Book 
    Runnable examples  

IO Directory:
  1. Create directory and directories recursively(mkdir)
  2. List all files under directory recursively, like UNIX ls or DOS and VMS dir
  3. List root directory