Skip to content

Commit

Permalink
hashCode/toString can be overridden, not overloaed
Browse files Browse the repository at this point in the history
  • Loading branch information
danilopiazza committed Oct 8, 2014
1 parent e035841 commit a8ca350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CheatSheet.md
Expand Up @@ -151,7 +151,7 @@ or

- General object hierarchy:

- `scala.Any` base type of all types. Has methods `hashCode` and `toString` that can be overloaded
- `scala.Any` base type of all types. Has methods `hashCode` and `toString` that can be overridden
- `scala.AnyVal` base type of all primitive types. (`scala.Double`, `scala.Float`, etc.)
- `scala.AnyRef` base type of all reference types. (alias of `java.lang.Object`, supertype of `java.lang.String`, `scala.List`, any user-defined class)
- `scala.Null` is a subtype of any `scala.AnyRef` (`null` is the only instance of type `Null`), and `scala.Nothing` is a subtype of any other type without any instance.
Expand Down

0 comments on commit a8ca350

Please sign in to comment.