A A

A A

  • NA
  • 21
  • 12k

are 2 constructors in the same class possible?

Oct 6 2013 7:47 PM
I was wondering if it was possible to create 2 constructors inside the same class. I looked up some information and found out that there is a keyword "THIS" that i can use, BUT i wanted to know if it was possible to create 2 constructors in the same class WITHOUT using "THIS".

like for example would i be able to create :

class myClass
{
public constructor_1()
{
//code
}
public constructor_2()
{
//some more code
}
}

class Main()
{
//code
}


Answers (3)