constructor

US /kənˈstrʌk.t̬ɚ/
UK /kənˈstrʌk.t̬ɚ/
"constructor" picture
1.

ผู้รับเหมา, ผู้สร้าง

a person or company that builds or constructs something, especially a building or road.

:
The constructor completed the new bridge ahead of schedule.
ผู้รับเหมาสร้างสะพานใหม่เสร็จก่อนกำหนด
We hired a local constructor for our home renovation.
เราจ้างผู้รับเหมาท้องถิ่นมาปรับปรุงบ้านของเรา
2.

คอนสตรักเตอร์

a special method, in object-oriented programming, for creating and initializing an object.

:
In Java, the constructor is called when a new object is instantiated.
ในภาษา Java, คอนสตรักเตอร์จะถูกเรียกเมื่อมีการสร้างอ็อบเจกต์ใหม่
Every class in C++ has at least one constructor, even if it's implicitly defined.
ทุกคลาสใน C++ มีคอนสตรักเตอร์อย่างน้อยหนึ่งตัว แม้ว่าจะถูกกำหนดโดยปริยายก็ตาม