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 are different types of constructors in kotlin?



What are different types of constructors in kotlin?..

Answer / Shashi

In Kotlin, there are primary constructors (default) and secondary constructors. Primary constructors have a name and can contain parameters, while secondary constructors do not have a name but can be created by using the `init` block or inheritance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

what operator is used to handle null exceptions in Kotlin?

1 Answers  


How to make a class data class ?

1 Answers  


Does Kotlin support primitive Datatypes?

1 Answers  


What is Range in Kotlin?

1 Answers  


What is the difference between Const and Val?

1 Answers  


What is the difference between inline and infix functions? Give an example of each.

1 Answers  


What are the types of strings available in kotlin?

1 Answers  


What is Ranges operator in Kotlin?

1 Answers  


Mention few features that Kotlin provides but not java ?

1 Answers  


What are the Strings available in Kotlin ?

1 Answers  


What is the type of the following Array?, val arr = arrayOf(1, 2, 3);

0 Answers  


Tell me the default behavior of Kotlin classes?

1 Answers  


Categories