• 2022-05-29
    如下A类的定义中,不可以使用new A( )创建对象的是
    A: public class A { int x; double d; }
    B: public class A { int x; double d; public A(){
    } }
    C: public class A { int x; double d; public A(){ x = 1; d = 0.5; } }
    D: public class A { int x; double d; public A(int x,double d){ this.x = x;
    this.d = d; } }
    E: public class A { int x; double d; public A(int x,double d){ this.x = x;
    this.d = d; } public A( ){
    } }