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...


How do we declare a private Primary Constructor in Scala? How do we make a call to a private Primary Constructor in Scala?



How do we declare a private Primary Constructor in Scala? How do we make a call to a private Primary..

Answer / Mohd Junaid Siddiqui

To declare a private primary constructor, you simply add the 'private' keyword before 'def'. To call a private primary constructor from another constructor (secondary constructor), use the 'super' keyword. Here is an example: class MyClass(private def this(name: String)) { ... }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What do you understand by apply and unapply methods in scala?

1 Answers  


What is the default unit and functional testing framework for play? What is the default build tool for play? What is the default template engine for play? What is the built-in web server available in

1 Answers  


Does Scala support Operator Overloading? Does Java support Operator Overloading?

1 Answers  


What is guard in Scala’s for-comprehension construct?

1 Answers  


List different types of literals available in scala?

1 Answers  


What is an Anonymous Function In Scala? What is a Function Literal in Scala? What are the advantages of a Anonymous Function/Function Literal in Scala?

1 Answers  


Which scala library is used for the functional programming?

1 Answers  


What is 'Type Inference' in Scala?

1 Answers  


Like Hibernate for Java-based applications, What are the Popular ORM Frameworks available to use in Play/Scala based applications?

1 Answers  


When compare to Normal Class, What are the major advantages or benefits of a Case-class?

1 Answers  


How to create arrays in scala?

1 Answers  


What is Either in Scala? What are Left and Right in Scala? Explain Either/Left/Right Design Pattern in Scala?

1 Answers  


Categories