Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



#scala #traits
a trait is very similar to what we have abstract classes in Java.
If you want to change selection, open document below and click on "Move attachment"

Scala Traits
consists of two methods isEqual and isNotEqual. Here, we have not given any implementation for isEqual where as another method has its implementation. Child classes extending a trait can give implementation for the un-implemented methods. So <span>a trait is very similar to what we have abstract classes in Java. Below is a complete example to show the concept of traits: trait Equal { def isEqual(x: Any): Boolean def isNotEqual(x: Any): Boolean = !isEqual(x) } class Point(xc: Int, yc: Int) e


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.