- Absolute path and canonical path:
C: empfile.txt
- This is a path, an absolute path, and a canonical path.C: empmyappin..\..file.txt
- This is a path and an absolute path. It's not a canonical path.- A canonical path is always an absolute path.
- getCanonicalPath()/getCanonicalFile():
-
- A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent. This method first converts this pathname to absolute form if necessary, as if by invoking the
getAbsolutePath()
method, and then maps it to its unique form in a system-dependent way. This typically involves removing redundant names such as "." and ".." from the pathname, resolving symbolic links (on UNIX platforms), and converting drive letters to a standard case (on Microsoft Windows platforms).
- A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent. This method first converts this pathname to absolute form if necessary, as if by invoking the
- Static binding vs. Dynamic binding:
- How to use InputVerifier class:
- n
- n
- n
- n
- n