logo - 刷刷题
下载APP
【单选题】

为了防止实例化一个类,

A.
不要在构造函数上使用任何修饰符。
B.
在构造函数上使用public修饰符。
C.
在构造函数上使用private修饰符。
D.
在构造函数上使用static修饰符。
举报
题目标签:实例化
参考答案:
参考解析:
.
刷刷题刷刷变学霸
举一反三

【单选题】●工作流管理系统应用中,模型实例化阶段完成(29) 。(29)

A.
企业经营过程模型建立
B.
工作流建模工具选择
C.
运行所需参数设定
D.
人机交互和应用执行

【多选题】以下泛型类public class Generic<T> {private T t; public void setT(T t) {this.t = t; }public T getT() {return t;}}下面实例化是正确的有( )。

A.
Generic<String> f2 = new Generic<>();
B.
Generic<Integer> f4 = new Generic<Number>();
C.
Generic<Number> f3 = new Generic<Integer>();
D.
Generic<String> f1 = new Generic<String>();

【多选题】对于函数模板template void foo(T t) { // Do something }的显式实例化方法有

A.
template void foo(int);
B.
template void foo(double);
C.
template void foo(long);
D.
template void foo<>(char);