如果该类具有一个无参构造函数,您想使用这个构造函数,然后立即在其上调用一个实例方法,那么有一种捷径。
If the class has a no-args constructor, and you want to use that constructor and then immediately invoke a single instance method on it, there's a shortcut.
一个类可以有多个构造函数,每个构造函数必须有与其他构造函数不同数目或类型的形参。
A class can have multiple constructors. Each constructor must differ from the others in the number or types of its parameters.
没有形参的f 函数和有两个int 型形参的f 函数对于这个函数调用来说都不可行。
The function that has no parameters and the one that has two int parameters are not viable for this call.
应用推荐