In this example we are find user home directory.
We are using System class to get the information about system. System class extends Object class. System class allow us to get or set system information.
The method used into this example:
This method is used to get the property of system for passing Key values.
In this example we are passing "user.home" as key to get the user define home directory.
The code of the program is given below:
The output of the program is given below:
C:\convert\rajesh\completed>java UserHomeExample User Home Path: C:\Documents and Settings\Administrator
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 29, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles