---
title: "System.identityHashCode(Object obj)"
author: "C_SHaDow"
date: "2012-12-08T16:16:01Z"
tags: []
categories: ["编程语言"]
slug: "system-identityhashcode-object-obj"
draft: false
lastmod: "2012-12-08T16:16:01Z"
id: 1744188
url: "https://c-shadow.iteye.com/blog/1744188"
---

System提供的identityHashCode()静态方法用于获取某个对象唯一的hashCode值，这个identityHashCode()的返回值与该类是否重写了hashCode()方法无关，只有当两个对象相同时，它们的identityHashCode值才会相等。