I am developing a tool, which takes a path of an xml file. Now that path can be either relative or absolute. Inside the code, when I have only a string, is there a way to identify that the path is absolute or relative?
xml
How about File.isAbsolute():
File.isAbsolute()
File file = new File(path); if (file.isAbsolute()) { ... }
2.1m questions
2.1m answers
60 comments
57.0k users