Sunday, 11 June 2017

Java Tutorial : Java IO (Java File - How to get the current working directory) ~ foundjava


Click here to watch in Youtube : 

FileDemo.java
public class FileDemo
{

    public static void main(String[] args)
    {
        String workingDir = System.getProperty("user.dir");
        System.out.println("Current working directory : " + workingDir);
    }

}
Output
Current working directory : D:\eclipse\workspace\JavaIODemo
Click the below link to download the code:

CLICK HERE

No comments:

Post a Comment