查询pc的盘符。
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
File[] roots=File.listRoots();
for(int i=0;i< roots.length;i++){
System.out.println(roots[i].getPath());
}
}
?
?
?
?
查询pc的盘符。
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
File[] roots=File.listRoots();
for(int i=0;i< roots.length;i++){
System.out.println(roots[i].getPath());
}
}
?
?
?
?