There are two types of constructors in Kotlin which are-

  • Primary constructor- It is a specific section of class header and mostly it is always declared after the class name.
  • Secondary constructor- This section of the constructor is always declared inside the class.
BY Best Interview Question ON 07 Oct 2019