Are methods and constructors the same thing?

3

Some sources say that constructor is a special type of method, while others say that constructors are not methods. Some people also say that although they are different from the JVM, they treat them the same way. After all, is a constructor a type of method or are things different only with some aspects in common?

    
asked by anonymous 19.02.2016 / 19:20

1 answer

4

Yes, constructors are methods.

And it can be said that they are "special" because they can only be called in the instance act of a class.

You can apply the same security for access, such as public, private, protected.

    
19.02.2016 / 19:44