Notes on everything
Tuesday, October 27, 2015
fetch a current directory
This program fetch a current directory.
code:
public class Test1 { public static void main(String[] args) { System.out.println(getCurrentDir()); } public static String getCurrentDir(){ String path = new File(".").getAbsoluteFile().getParent(); return path; }
}
Newer Post
Older Post
Home