Java File.hashCode()
Syntax
File.hashCode() has the following syntax.
public int hashCode()
Example
In the following code shows how to use File.hashCode() method.
//w w w . j a va 2 s. c o m
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.hashCode());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.io »
Java Tutorial »
java.io »