Java File.isAbsolute()
Syntax
File.isAbsolute() has the following syntax.
public boolean isAbsolute()
Example
In the following code shows how to use File.isAbsolute() method.
/* ww w . j ava2 s .c om*/
import java.io.File;
public class Main {
public static void main(String[] args) throws Exception {
// create new files
File f = new File("c:/");
System.out.print(f.isAbsolute());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.io »
Java Tutorial »
java.io »