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 are Primary Constructors different from Secondary Constructors ?



How are Primary Constructors different from Secondary Constructors ?..

Answer / Narendra Kumar Tiwari

Primary Constructors are the regular constructors declared in the class, and they have the same name as the class. They can contain initializer blocks to initialize properties. Secondary Constructors are declared using the constructor keyword inside another constructor and can have unique names.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

How many constructors are available in Kotlin?

1 Answers  


Why you should shift from Java to kotlin?

1 Answers  


What is the difference between object { } block and companion object { } code block in Kotlin?

0 Answers  


How to handle null exceptions in Kotlin programming?

1 Answers  


List the number of constructors available in Kotlin?

1 Answers  


Give me name of the extension methods Kotlin provides to java.io.File

1 Answers  


Does Kotlin allow macros?

1 Answers  


How are Primary Constructors different from Secondary Constructors ?

1 Answers  


What is kotlin’s null safety?

1 Answers  


Name the extension methods Kotlin provides to java.io.File?

1 Answers  


What is the role of open keyword in Kotlin?

1 Answers  


What do you mean by kotlin string interpolation?

1 Answers  


Categories