1.

Constructor vs Method in Java

Answer»

A method has a return TYPE UNLIKE constructor. Constructor is invoked implicitly. Whereas method is invoked explicitly.

The NAME of the constructor is the same as the class name. HOWEVER, the name of the method may or may not be same as the name of the class.



Discussion

No Comment Found