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 the use of auxiliary constructors in scala? explain the rules to follow in defining auxiliary constructors in scala?



What is the use of auxiliary constructors in scala? explain the rules to follow in defining auxiliar..

Answer / Charanjeet Singh

Auxiliary constructors in Scala are used to provide multiple ways for creating instances of a case class. They are defined using the `apply` method and must follow these rules: they should be defined as private, can take any number of arguments (but not variable arguments), and should return an instance of the case class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

In what ways Scala is better than other programming language?

1 Answers  


What is scala closure?

1 Answers  


How to define Factory methods using object keyword in Scala? What is the use of defining Factory methods in object?

1 Answers  


Explain bitset in scala?

1 Answers  


What are throws in scala?

1 Answers  


What is formula tail in scala?

1 Answers  


Like Java’s java.lang.Object class, what is the super class of all classes in Scala?

1 Answers  


Mention the distinction between associate degree object and a category ?

1 Answers  


What is list in scala collection?

1 Answers  


What is Null in Scala? What is null in Scala? What is difference between Null and null in Scala?

1 Answers  


What is scala trait?

1 Answers  


What are streams in scala?

1 Answers  


Categories