1.

What are constructors, explain its types?

Answer»

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.


Discussion

No Comment Found