listRoots()

rodrigo
27 de Octubre del 2003
alguien sabe como funciona el metodo listRoots() ya intente de varias formas pero no consigo q funcione
gracias

Diego Alejandro Sanchez Bernal
26 de Agosto del 2010
import java.io.*;

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
}
}