/*
* Output:
getCanonicalPath() = C:\winnt
*/
import java.io.File;
public class MainClass {
public static void main(String args[]) {
try {
File file = new File("c:\\winnt");
System.out.println("getCanonicalPath() = " + file.getCanonicalPath());
} catch (Exception e) {
e.printStackTrace();
}
}
}
|