Method (computer programming): Difference between revisions

Content deleted Content added
m An accessor method that changes the state of an object is sometimes especially called '''mutator''' or '''update method'''. Objects with that method is considered mutable object.
mNo edit summary
Line 8:
 
An '''accessor method''' is a kind of method that is usually small, simple and provides the way to bypass access control. Although it introduces new dependency, use of the methods are preferable because they provide a certain layer. An accessor method that changes the state of an object is sometimes especially called '''mutator''' or '''update method'''. Objects with that method is considered [[immutable object|mutable object]].
 
A method called initially in [[object creation]] is called '''constructor'''.