| 1. |
What Is The Use Of Auxiliary Constructors In Scala?please Explain The Rules To Follow In Defining Auxiliary Constructors In Scala? |
|
Answer» In Scala, The main purpose of Auxiliary Constructors is to overload constructors. LIKE Java, We can provide various kinds of constructors so that USE can choose the right one BASED on his requirement. Auxiliary Constructor Rules:
NOTE:- If you want to learn about Scala’s Constructors, please refer my Scala posts at: Primary Constructor and Auxiliary Constructor. In Scala, The main purpose of Auxiliary Constructors is to overload constructors. Like Java, We can provide various kinds of constructors so that use can choose the right one based on his requirement. Auxiliary Constructor Rules: NOTE:- If you want to learn about Scala’s Constructors, please refer my Scala posts at: Primary Constructor and Auxiliary Constructor. |
|