题目详情
多选题 分析以下代码:class Test { private double i; public Test(double i) { this.t(); this.i = i; } public Test() { System.out.println("Default constructor"); this(1); } public void t() { System.out.println("Invoking t"); }}
A. this.t()可以用t()代替
B. this.i可以用i代替
C. 必须在System.out.println("Default constructor")之前调用this(1)
D. this(1) 必须替换为this(1.0)

学科:Java程序设计
时间:2025-03-14 05:58:35
相关题目
相关作业
