Re: [問題] Object

看板java作者 (C++)時間19年前 (2006/02/12 14:13), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《Contactman.bbs@bbs.badcow.com.tw (上B只為剿小白出氣!)》之銘言: : ※ 引述《mojo (我們是愛國鬥士)》之銘言: : : 記憶體位址啦 喔啦啦啦!!!!!! : 鬼扯... 基本上他說得沒錯唷 如果hashcode沒有特別實做的話 會直接繼承parent class的 Object的hashcode實做就是直接傳回記憶體位址...所以後面那一串的確是記憶體位址 As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.217.14
文章代碼(AID): #13xj83Pu (java)
文章代碼(AID): #13xj83Pu (java)