constructor

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

nhà thầu, người xây dựng

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

:
The constructor completed the new bridge ahead of schedule.
Nhà thầu đã hoàn thành cây cầu mới trước thời hạn.
We hired a local constructor for our home renovation.
Chúng tôi đã thuê một nhà thầu địa phương để cải tạo nhà.
2.

hàm tạo

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.
Trong Java, hàm tạo được gọi khi một đối tượng mới được khởi tạo.
Every class in C++ has at least one constructor, even if it's implicitly defined.
Mỗi lớp trong C++ đều có ít nhất một hàm tạo, ngay cả khi nó được định nghĩa ngầm định.