Tuesday 26 August 2014

Get User account name

Use the property "user.name" to get the user account name.

public class GetProperty {
    public static void main(String args[]){
        System.out.println(System.getProperty("user.name"));
    }
}

Output
krishna


                                                             Home

No comments:

Post a Comment