Learning Scala Programming
上QQ阅读APP看书,第一时间看更新

AnyVal and AnyRef

Both AnyVal and AnyRef are two subclasses of root class Any. These two represent two families of types in Scala: the first ones are object references, the latter are value classes.