A CONSTRUCTOR in Chinese translation

[ə kən'strʌktər]

Examples of using A constructor in English and their translations into Chinese

{-}
  • Political category close
  • Ecclesiastic category close
  • Programming category close
If we were calling a constructor, the name of the method would have been"<init>".
如果正在调用构造器,则方法的名称为“<init>”。
When a function is used as a constructor(with the new keyword), its this is bound to the new object being constructed.
当函数是被当作constructor来调用(使用new关键字)时,this被绑定到新分配的对象上。
A Constructor is a special member function in a class whose task is to initialize data members.
构造函数是个特殊成员函数,初始化类对象的数据成员。
Also, TypeScript has some cool features that are not in ES6, like enums and the ability to initialize member variables in a constructor.
另外,TypeScript还有一些ES6所欠缺的优秀功能,例如Enums,以及在构造器中对成员变量进行初始化的功能。
Having more than one occurrence of a constructor method in a class will throw a SyntaxError error.
如果类包含多个constructor的方法,则将抛出一个SyntaxError。
A constructor is a member function which has the same name of the class without a return type.
构造函数是一个特殊的成员函数,名字与类名相同,不写返回值类型。
If a method has the same name as the class it is in, but also has a return type it is not a constructor.
如果一个方法有了类同样的名字但还有返回值,它不是构造器
A constructor cannot be abstract, static, final, native, or synchronized.
因此,构造函数不能是abstract,static,final,naticeorsynchronized的。
Think about it, a constructor is a method with no return value and the same name as the class.
考虑一下,构造函数是一个没有返回值,并且名字与类名相同的方法。
A constructor cannot be declared as abstract, static, final, native, strictfp, or synchronized.
因此,构造函数不能是abstract,static,final,naticeorsynchronized的。
A constructor resembles an instance method in java but it's not a method as it doesn't have a return type.
构造函数类似于java中的实例方法,但它不是一个方法,因为它没有返回类型。
A constructor can never return anything, which is why you don't have to define a return type for it.
构造函数不会返回任何值,所以你无需为它定义返回值类型。
A constructor cannot be abstract, final, native, static, strictfp nor synchronized.
因此,构造函数不能是abstract,static,final,naticeorsynchronized的。
Let's note once again- technically, any function can be used as a constructor.
让我们再次注意-从技术上讲,任何函数都可以用作构造函数
As only one or the other can be the first method call, you can not use both super() and this() in a constructor.
由于只有一个能被第一个调用,你不能在构造函数中既使用super()又使用this()。
In this case the function becomes a constructor- a factory for objects.
在这种情况下,这个函数就变成了构造函数(也就是一个对象工厂)。
Until C++11, aggregate initialization could not be used in a constructor initializer list due to syntax restrictions.
C++11前,聚合初始化不能用于构造函数初始化器列表,因为语法限制。
When a function is used as a constructor(with the new keyword), its this is bound to the new object being constructed.
当一个函数用作构造函数时(适用new关键字),它的this被绑定到正在构造的新对象。
We are not a constructor; we are just a small team,” Vergne explained.
我们不是建设者;我们只是一个小团队,“Vergne解释道。
A constructor can be created using the keyword constructor as shown in the code below.
可以使用关键字constructor创建构造函数,如下面的代码所示:.
Results: 71, Time: 0.0313

Word-for-word translation

Top dictionary queries

English - Chinese