• 2022-07-22
    以下的类(接口)定义中正确的是( )
    A: public class A{ private int x; public getX(){ return x; }}
    B: public abstract class A{ private int x; public abstract int getX(); public int aMethod(){ return 0; }}
    C: public class A{ private int x; public abstract int getX();}
    D: public interface interfaceA{ private int x; public int getX(){ return x; }}
  • 举一反三