Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is Primary Constructor? What is Secondary or Auxiliary Constructor in Scala?



What is Primary Constructor? What is Secondary or Auxiliary Constructor in Scala?..

Answer / Ranjit Maurya

The primary constructor of a class is the one that takes parameters for initializing instance variables. In Scala, if no constructors are explicitly defined, a default primary constructor with no arguments will be automatically generated. A secondary or auxiliary constructor is a constructor that calls another constructor, usually the primary constructor, to initialize an object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

How do you prove that by default, Case Object is Serializable and Normal Object is not?

1 Answers  


What are the differences between Array and ArrayBuffer in Scala?

1 Answers  


What is REPL in Scala? What is the use of Scala’s REPL? How to access Scala REPL from CMD Prompt?

1 Answers  


What is seq in scala collection?

1 Answers  


What are left and right in scala?

1 Answers  


What is PreDef in Scala?

1 Answers  


Explain the difference between function and method in scala?

1 Answers  


What is currying in scala?

1 Answers  


What is a stream in scala?

1 Answers  


What do you mean by implicit parameters?

1 Answers  


What is repl in scala?

1 Answers  


What is a ‘Scala map’?

1 Answers  


Categories