In this example we will list out all the drives in the disk. This requires an array of File class where all the drives will get stored by using only one method.
listRoots(): It is the method of the File class. It lists the name of the drives.
Code of this example is given below:
output is given below:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 7, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles