File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/script/scala/progscala3/objectsystem/hashcode Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,12 @@ println(s"O3: ${O3.hashCode} != ${"O3".hashCode}")
1414println(s " O3.O4: ${O3 .O4 .hashCode} != ${" O3.O4" .hashCode}" )
1515println(s " O3.O4 vs. O4: ${O3 .O4 .hashCode} == ${" O4" .hashCode}" )
1616println(s " O3.O4 vs. O3: ${O3 .O4 .hashCode} != ${" O3" .hashCode}" )
17+
18+ // The following section was not shown in the Third Edition, First Printing.
19+ // There is an ## alias for hashCode, but I never use it:
20+ println(s " O1: ${O1 .## } == ${" O1" .## }" )
21+ println(s " O2: ${O2 .## } == ${" O2" .## }" )
22+ println(s " O3: ${O3 .## } != ${" O3" .## }" )
23+ println(s " O3.O4: ${O3 .O4 .## } != ${" O3.O4" .## }" )
24+ println(s " O3.O4 vs. O4: ${O3 .O4 .## } == ${" O4" .## }" )
25+ println(s " O3.O4 vs. O3: ${O3 .O4 .## } != ${" O3" .## }" )
You can’t perform that action at this time.
0 commit comments