Path isAbsolute() method in Java with Examples
The Java Path interface was added to Java NIO in Java 7. isAbsolute() method of java.nio.file.Path used to check this path is absolute or not. This method return true if, and only if, this path is absolute. An absolute path is a path that doesn’t need to be combined with other path information in order to locate a file.
Parameters: This method accepts nothing.
Return value: This method returns true if, and only if, this path is absolute.
Below programs illustrate isAbsolute() method:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.