单项选择题

下列代码中,将引起一个编译错误的行是( )。
1)public class Test
2)int m,n;
3)public Test()
4)public Test(int a)m=a;
5)public static void main(String args[])
6)Test t1,t2;
7)int j,k;
8)j=0;k=0;
9)t1=new Test();
10)t2=new Test(j,k);
11)
12)

A.第3行
B.第5行
C.第6行
D.第10行
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。 public class FindKeyWords public static void main(sring[]args) sting text= An array is a data structur that stores a collection of + values of the same type. You access each individual value + through an integer index. For example,if a is an array + of inergers,then a[i]is the ith integer in the array. ; Int arrayCount=0; Int idex=-1; Sting arrarStr= array ; Index=text.indexof(arravStr); While(index______0) ++arrayCount; Index+=arrayStr.length(); Index=text.indexof(arrayStr,index); System.out.println ( the text contains +arrayCount+ arrays );
A.<
B.=
C.<=
D.>=
单项选择题
下面的哪一个关键字通常用来对对象加锁,从而使得对对象的访问是排他的
A) serialize
B) transient
C) synchronized
D) static
相关试题
  • 当使用Thread t=new Thread(r)创建一...
  • Java的线程调度策略是一种基于优先级的__...
  • Java运行时系统通过______周期性地释...
  • JTextField的事件监听器接口是 【13】 ...
  • 能够用于创建可变字符串对象的类是____...