单项选择题

有一个类A,以下为其构造函数的声明,其中正确的是( )。

A.void A (int x)...
B.A (int x)...
C.a(int x)...
D.void a (int x)…
<上一题 目录 下一题>
热门 试题

单项选择题
给出下列的不完整的类代码,则下列的( )语句可以加到横线处。 class Person String name,department; int age public Person(String n)name=n; public Person(String n,int a)name=n;age=a; pubilc Person(String n,String d,int a) _______________ department=d;
A.Person(n,a);
B.this(Person(n,a));
C.this(n,a);
D.this(name,age);
单项选择题
给出下面代码片段: public class Test public static void main (String args[ ]) int m; switch(m) case 0:System.out.println( case 0 ); case 1:System.out.println( case 1 ):break; case 2: default:System.out.println( default ); 下列m的( )值将引起 default 的输出。
A.1
B.2
C.4
D.0
相关试题
  • 请在划线处编写适当语句,完成此程序使它能...
  • 下面是用户程序对Applet类中方法paint()...
  • Java源程序文件编译后产生的文件称为 __...
  • 变量属性是描述变量的的作用域,按作用域分...
  • 软件工程研究的内容主要包括:______...