Use
the property "user.home" to get the user home directory.
public class GetProperty { public static void main(String args[]){ System.out.println(System.getProperty("user.home")); } }
Output
C:\Users\Krishna
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
public class GetProperty { public static void main(String args[]){ System.out.println(System.getProperty("user.home")); } }
C:\Users\Krishna
No comments:
Post a Comment