import java.io.*;
public class ListSystemRoots
{
static File giveRoot[];
public ListSystemRoots(){
}
public static void main(String args[]){
giveRoot = File.listRoots(); // list the names of the drives
for (int i = 0; i < giveRoot.length; i++)
System.out.println(giveRoot[i]); // Print the list
}
}In this code, I am going to explain about the Display the List of Drives in the System in JAVA
