1.

What Is ‘scala Trait’ In Scala?

Answer»

‘Traits’ are USED to define OBJECT types specified by the signature of the SUPPORTED methods. Scala allows to be partially implemented but traits may not have constructor parameters. A trait consists of method and field definition, by MIXING them into classes it can be REUSED.

‘Traits’ are used to define object types specified by the signature of the supported methods. Scala allows to be partially implemented but traits may not have constructor parameters. A trait consists of method and field definition, by mixing them into classes it can be reused.



Discussion

No Comment Found