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

Give a syntax for declaring a variable as volatile in Kotlin?

1 Answers  


How to convert a String to an Integer?

1 Answers  


What is init block in Kotlin?

1 Answers  


How to create static methods in Kotlin?

1 Answers  


How Kotlin works?

1 Answers  


State the advantages and disadvantages of kotlin?

1 Answers  


Define Lambda Function in Kotlin?

1 Answers  


How can data class be used in Kotlin?

1 Answers  


What are the advantages and disadvantages of Kotlin?

1 Answers  


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

1 Answers  


In kotlin, can we create an empty array?

1 Answers  


How do you declare a variable in kotlin?

1 Answers  


Categories