실제로 어떻게 쓰이나요?
아래 예문들을 통해 각 단어가 어떤 상황에서 어떻게 쓰일 수 있는지 감을 잡아보세요!
initializer
예문
The initializer function sets the default values for the user object. [initializer: noun]
이니셜라이저 함수는 사용자 개체의 기본값을 설정합니다. [이니셜라이저: 명사]
예문
We need to call the initializer method to set up the database connection. [initializer: method]
데이터베이스 연결을 설정하려면 이니셜라이저 메서드를 호출해야 합니다. [이니셜라이저: 메서드]
constructor
예문
The constructor function creates a new instance of the car class. [constructor: noun]
생성자 함수는 car 클래스의 새 인스턴스를 만듭니다. [생성자 : 명사]
예문
We need to pass the parameters to the constructor method to create a new object. [constructor: method]
새 객체를 생성하려면 생성자 메서드에 매개변수를 전달해야 합니다. [생성자 : 메서드]
추가로 알아두면 좋아요
어떤 단어가 더 많이 쓰이나요?
Constructor는 프로그래밍 언어에서 initializer보다 더 일반적으로 사용됩니다. Constructor는 객체 지향 프로그래밍의 기본 개념이며 많은 프로그래밍 언어에서 사용되는 반면 initializer는 덜 일반적이며 특정 언어에서 사용됩니다.
어떤 단어가 더 포멀한가요?
initializer와 constructor는 모두 프로그래밍에 사용되는 기술 용어이며 공식 언어로 간주됩니다.