There is a class method (static method) in which I create and build some object. And for filling that object, I create it as mutable object.  My mutable object is a subclass of immutable object. So i can return it as super Class type. That object is just created in class method and returns. It is not a part of object or class state. Should I return mutable object or it immutable copy? (what solution will be correct in concept of encapsulation)For example there is some pseudo code:// MutableArray is subclass of ArrayMutableArray : Array;// Another classstatic (Array *)getEngineers {   Array *employees = Array.arrayWithContentsOfResource(employees.txt);   MutableArray *engineers = new MutableArray;   for (Employee *employee in employees) {      if (employee.profession == Engineer) {         engineers.addObject(employee)      }       }   return engineers; // should I return Array.arrayWithArray(engineers) instead of engineers ?} Update:I mean, if I have a mutable array that is a member of the object, then it makes sense to return immutable copy in getter method (to provide access control and encapsulation). But if I have method like in example. I need only immutable object for using. But creating immutable copy of array is additional operations. Does it make sense to make it immutable? 
Immutable vs mutable object as returned parameter for class method
object oriented;encapsulation;static methods;immutability;mutable
if only your team is using this code in the same process then i would return the same object (mutable object) . keep it simple and fast. Your own team would not change something on the objects unless they needed to, and if they did then they would have to make another copy.If I was making a API too I would not keep it immutable, simple because engineer looks like its an object that can change (like if the object had something like reporting To or degrees-held - that can change over time.Objects should mimic their real world counter parts as much as possible. Some attributes could be immutable (like date of birth etc)Good external docs or code comments could explain how to use the object where required