Java IO: difference between absolute,relative and canonical path

The common way of accessing the file system in java is through the java.io.File API. In this tutorial, we explain how to use the File API to access a file using absolute and relative paths, we also describe the difference between getPath(), getAbsolutePath() and getCanonicalPath() methods provided by the API. 1. Absolute vs Relative In general, a path is a way...