System.identityHashCode(Object x) : System « java.lang « Java by API






System.identityHashCode(Object x)

  
import java.io.File;

public class Main {
  public static void main(String[] argv) throws Exception {
    File file1 = new File("a");
    File file2 = new File("a");
    File file3 = new File("b");

    int ihc1 = System.identityHashCode(file1);
    System.out.println(ihc1);
    int ihc2 = System.identityHashCode(file2);
    System.out.println(ihc2);
    int ihc3 = System.identityHashCode(file3);
    System.out.println(ihc3);

  }
}

   
    
  








Related examples in the same category

1.System.exit(int status)
2.System.in
3.System.in.read()
4.System.out
5.System: arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
6.System: clearProperty(String key)
7.System: console()
8.System: currentTimeMillis()
9.System: getenv(String key)
10.System: getProperty(String name)
11.System.getProperty ("user.dir")
12.System: getProperty(String key, String def)
13.System: getProperties()
14.System: nanoTime()
15.System.setErr(PrintStream err)
16.System: setIn(InputStream in)
17.System: setOut(PrintStream err)
18.System: setProperty(String key, String value)