Skip to content

Make unified-types.md more intuitive to new comers #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 9, 2017
Prev Previous commit
Next Next commit
Update unified-types.md
  • Loading branch information
shogowada authored Feb 1, 2017
commit c1f59207900072f0124822b8ae99a2d2d293515b
2 changes: 1 addition & 1 deletion tutorials/tour/unified-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The superclass of all classes `scala.Any` has two direct subclasses: `scala.AnyV

`scala.AnyVal` represents value classes. All value classes are not nullable and predefined; they correspond to the primitive types of Java-like languages. Note that the diagram above also shows implicit conversions between the value classes.

`scala.AnyRef` represents reference classes. All non-value classes are defined as reference class. Every user-defined class in Scala implicitly extends `scala.AnyRef`. If Scala is used in the context of a Java runtime environment, then `scala.AnyRef` corresponds to `java.lang.Object`.
`scala.AnyRef` represents reference classes. All non-value classes are defined as reference class. Every user-defined class in Scala implicitly extends `scala.AnyRef`. If Scala is used in the context of a Java runtime environment, `scala.AnyRef` corresponds to `java.lang.Object`.

Here is an example that demonstrates that strings, integers, characters, boolean values, and functions are all objects just like every other object:

Expand Down