In this section, you will study how to obtain the absolute path of a particular file. For this, we have define a file 'MainClass.java'. The method file.getAbsolutePath() returns the absolute path of the given file.
Here is the code of GetAbsolutePath.java
Output will be displayed as:
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: November 6, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles