Relative path and absolute path in Java

Paths in JavaSE are divided into absolute paths and relative paths:

  1. Relative path: project name/ (up to resource name)
  2. Absolute path: drive letter:/directory/file name

Paths in JavaEE are also divided into absolute paths and relative paths:

  1. Relative path:
    . Indicates the current file directory
    .. Indicate the parent directory of the current file
    name indicates the files in the current directory, which is equivalent / filename
    / can be ignored

  2. Absolute path:
    http://ip address/project name/resource path

Guess you like

Origin blog.csdn.net/qq_43665244/article/details/114906369