Java Program to Find Current Working Directory
The getproperty() methods defined in System Class in Java which is used to retrieve the value of the property named in the argument list. This method property is specified by the key which accepts the parameter. If the property does not exist, this version of getProperty returns null.
public static String getProperty(String key)
- key: key whose system property we want
- System property as specified the key
- Null: if there is no property present with that key.
String path = System.getProperty(
"Working Directory = "
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!