This Java programming tutorial will teach you how you can construct a file name path. By using the constructing filename path it is possible to set dynamic path, which is helpful for mapping local file name with the actual path of the file.
Java API has provided us many packages, one of them is java.io package. This package contains a File class In this example we are using one static final variable of File class i.e.. separatorChar. The value of this separator is system dependent. If we are using Windows platform then the value of this separator is ' \ ' .
The code of the program is given below:
Output of this program is given below:
The path of the file is : \java\example
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