It is treated as a special member function because its name is the same as the class name . Java constructors are invoked when their objects are created. It is named such because, it constructs the value, i.e., provide data for the object, i.e., they are used to initialize objects.