In this section, you will learn how to obtain the window's username. We are providing you an example which will obtain the window's username by using the System.getProperty(). This will provide all the properties of the windows.
System.getProperty("user.name")- This method retrieve the username of the particular system from all the properties of Windows.
Here is the code of GetWindowUsername.java
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: April 17, 2011 If you enjoyed this post then why not add us on Google+? Add us to your Circles