えいたんごクイズ

constructor

/kənˈstrʌktɚ/

意味一覧 (4件)

noun

コンストラクター

解説 Definition

プログラミングでは、クラスから新しいオブジェクトを作る瞬間に呼ばれる初期化用の特別な処理を指します。メンバー変数の初期値設定や依存関係の受け取りなど、生成直後の状態を整えます。

A constructor is a person or thing that builds or creates something. In technical fields, especially programming, it means a special function used to create and set up a new object. The exact meaning depends on whether the context is general building or computing.

覚え方のコツ Memory Tip

プログラミングの constructor は、クラスから新しい objectinstance を作るときに最初に走る初期化処理です。これは constructor の「建設者」という基本義とは別の専門義で、物を作る人ではなく、生成直後の状態を整えるコードを指します。class, instance, new, initialize, property などが近くにあればこの意味です。destructor は反対に破棄時の処理として対で覚えると整理しやすいです。

The root is `construct`, so a `constructor` is the part that builds something at the start. In programming, think of the special code that runs when a new object is created. A simple contrast helps: `constructor` prepares at the beginning, while `destructor` cleans up at the end.

例文

In Java, the constructor initializes the object's properties.

Javaではコンストラクタがオブジェクトのプロパティを初期化する。

The constructor is called automatically when you create a new instance.

新しいインスタンスを作成するとき、コンストラクタが自動的に呼び出される。

You must define a constructor for your class to set initial values.

初期値を設定するためにクラスのコンストラクタを定義する必要がある。

noun

建設者けんせつしゃ

(意味 2)

解説 Definition

constructor は、建物・道路・機械などを作ったり組み立てたりする人や会社を指す名詞です。日常会話では builder の方が自然なことも多く、constructor はやや書き言葉・説明的な文脈で使われます。

A constructor is a person or company that builds or puts together things such as buildings, roads, bridges, or machines. It often appears in formal or explanatory writing, while builder is more common in everyday conversation. The word focuses on someone whose job is to create or assemble physical structures or equipment.

覚え方のコツ Memory Tip

construct は「建設する、組み立てる」という動詞で、そこに -or が付くと「それをする人・もの」を表します。actorcreator と同じ作り方です。builder より少し硬く、建物・橋・設備などを作る人や会社を指す場面で出やすい語です。IT の「コンストラクター」と同じ形ですが、このエントリでは物理的に何かを作る人という基本義に集中して覚えましょう。

Think of construct, which means "build" or "put together." When you add -or, it becomes "a person who does that," like actor or creator. It is a slightly more formal word than builder, and it is often used for someone or a company that builds structures, equipment, or other physical things. Even if you know constructor from IT, remember that this entry focuses on the basic meaning of a person who builds something in the real world.

例文

The constructor finished the new bridge ahead of schedule.

その建設者は予定より早く新しい橋を完成させた。

The museum hired a skilled constructor to assemble the large steel frame.

その博物館は大きな鉄骨を組み立てるために熟練した建設者を雇った。

In the report, the factory constructor was praised for its safe and efficient work.

その報告書では、その工場の建設者が安全で効率的な仕事をしたとして評価された。

noun

建築者けんちくしゃ

(意味 3)

解説 Definition

建物や構造物などを建設する人のこと。プログラミングではクラスを初期化するメソッドのことをいいます。

例文

The constructor built the bridge in record time.

その建築者は記録的な時間で橋を建てました。

The skilled constructor oversaw the project.

その熟練した建築者はプロジェクトを監督しました。

The constructor was responsible for all safety measures.

建築者はすべての安全措置に責任がありました。

noun

初期化しょきかメソッド

(意味 4)

解説 Definition

クラスがインスタンス化される際に自動的に呼び出される特殊なメソッドです。オブジェクトの初期化や必要な設定を行うために使われます。コンストラクタは多くのプログラミング言語で重要な機能です。

例文

The constructor method initializes the object.

初期化メソッドはオブジェクトを初期化します。

Every class needs a proper constructor.

すべてのクラスは適切な初期化メソッドが必要です。

The constructor takes several parameters.

初期化メソッドは複数のパラメータを受け取ります。

constructor の語源・成り立ち Etymology

constructorはラテン語construere「積み上げて組み立てる」が語源で、con-「共に」+ struct「積む・築く」+ -or「する人・もの」から成ります。structureinstructと同じstructを持ち、ばらばらの要素を組んで形にする役割が見えてきます。

Constructor comes from Latin construere, meaning "to build" or "to pile up together." It contains con- "together" and a root seen in structure, from the idea of arranging or building parts into a whole. With the ending -or, it became a noun for a person or thing that constructs. Related English words include structure and instruct.

外部辞書で調べる

この単語をシェア

この単語を英単語クイズで覚えよう