• 2022-06-08
    有一个类Test,下面为其构造方法的声明,正确的是( )。
    A: void Test(int i){}
    B: test(int i){}
    C: void test(int i){}
    D: Test(int i){}
  • D

    内容

    • 0

      有如下代码,则该程序运行时输出结果是。 class Test{ static int i=0; public void show() { i++; System.out.println(i); } } public class Demo { public static void main(String[] args) { Test test=new Test(); test.show(); } }

    • 1

      已知程序中已经定义了函数test,其原型如下: int test(int, int, int);则下列重载形式中正确的是( )。 A: char test(int,int,int); B: int test(int,int,double); C: int test(int,int,int=0); D: int TEST(int,int);

    • 2

      【单选题】与下述函数原型声明等价的是_______________。 int test(int a[3],int a[3][3]); (1.0分) A. int test(int a[],int a[][]); B. int test(int a[],int a[3][]); C. int test(int a[],int a[][3]); D. int test(int a[3],int a[3][]);

    • 3

      已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是( ) A: double test(int,int,double); B: int test(int,int,int=0); C: float test(int,int,float=3.5F); D: char test(int,int,int);

    • 4

      已知程序中已经定义了函数test,其原型是int test (int,int,int);,则下列重载形式中正确的是( )。 A.char test(int, int, int); B.double test (int,int,double); C.int test(int ,int, int=0); D.float test(int,int,float=3.5F);