Content deleted Content added
تم تصحيح خطأ مطبعي Tags: Reverted references removed Mobile edit Mobile app edit iOS app edit |
No edit summary Tags: Reverted Mobile edit Mobile app edit iOS app edit |
||
Line 22:
A [[Constructor (computer science)|''constructor'']] is a method that is called at the beginning of an object's lifetime to create and initialize the object, a process called [[object creation|construction]] (or ''instantiation''). Initialization may include an acquisition of resources. Constructors may have parameters but usually do not return values in most languages. See the following example in Java:
public class Main {
String _name;
Line 32:
}
}
===Destructors===
|