A Scala class can contain two kinds of constructors:
- Primary Constructor
- Auxiliary Constructor
I have delivered two tutorials on these two concepts with in-depth discussions and real-time examples.
Please go through the following two links to learn these two Scala concepts:
Post Brief TOC
- Introduction
- What is an Auxiliary Constructor?
- Auxiliary Constructor Advantages and Disadvantages
- Scala Auxiliary Constructor Examples
- Scala Auxiliary Constructor Rules
- Constructor Overloading With Auxiliary constructors
Post Brief TOC
- Introduction
- Primary Constructor in Scala
- Scala val and var in-brief
- Scala Primary Constructor With val and var
- Scala Primary Constructor in-brief
Please drop me a comment if you like my post or have any issues/suggestions
Happy Scala Learning!
No comments:
Post a Comment