【单选题】【消耗次数:1】
MAX_LENGTH 是int 型public 成员变量,变量值保持为常量1,用简短语句定义这个变量。( )
public int MAX_LENGTH=1;
final int MAX_LENGTH=1;
final public int MAX_LENGTH=1;
public final int MAX_LENGTH=1.
参考答案:
复制
纠错
相关题目
【判断题】 int intArray[]={0,2,4,6,8}; int length=int Array.length();
①  正确
②  错误
【判断题】 String str=abcedf; int length=str.length;
①  正确
②  错误
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_4 { public static void main(String[] args) { int x = 0; int y = 5/x; int[] z = { 1,2,3,4 } ; int p = z[4]; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_5 { public static void main(String[] args) { int[] z = { 1,2,3,4 } ; int p = z[4]; int x = 0; int y = 5/x; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 给出下面代码段, 哪行将引起一个编译时错误?( ) 1) public class Test { 2) int n = 0; 3) int m = 0; 4) public Test(int a) { m=a; } 5) public static void main(String arg[]) { 6) Test t1,t2; 7) int j,k; 8) j=3; k=5; 9) t1=new Test(); 10) t2=new Test(k); 11) } 12) }
①  行1
②  行4
③  行6
④  行9
【单选题】 已知有下面类的说明: public class X5_1_1 extends x{ private float f =10.6f; int i=16; static int si=10; public static void main(String[] args) { X5_1_1 x=new } } X5_1_1(); 在 main()方法中,下面哪条语句的用法是正确的?( )
①  x.f
②  this.si
③  X5_1_1.i
④  X5_1_1.f
【单选题】 设存在函数int max(int,int)返回两参数中较大值,若求22,59,70三者中最大值,下列表达式不正确的是( )
①  int m = max(22,max(59,70));
②  int m = max(max(22,59),70);
③  int m = max(22,59,70);
④  int m = max(59,max(22,70));
【单选题】 设存在函数int max(int,int)返回两参数中较大值,若求22,59,70三者中最大值,下列表达式不正确的是( )
①  int m = max(22,max(59,70));
②  int m = max(max(22,59),70);
③  int m = max(22,59,70);
④  int m = max(59,max(22,70));
【判断题】 已知:int *p1, *p2= 由此可知变量a的类型是:int *。
①  正确
②  错误
【单选题】 设存在函数int max(int,int)返回两参数中较大值,若求22,59,70三者中最大值,下列表达式不正确的是()
①  intm=max(22,max(59,70));
②  intm=max(max(22,59),70);
③  intm=max(22,59,70);
④  intm=max(59,max(22,70));
随机题目
【单选题】 当城市人口少于5万人时调查抽样率是()
①  1/15
②  1/10
③  1/8
④  1/5
【单选题】 环道不用设的是()
①  左转车道
②  交织车道
③  右转车道
④  集散车道
【单选题】 纵线形组合设计要点叙述不正确的是()
①  在视觉上自然地引导驾驶员的视线。
②  合理选择道路的纵、横坡度,既保证排水通畅又应避免过大的合成坡度
③  平、竖曲线半径均大时,不得重合,应分开设置。
④  不宜在一个长竖曲线内设两个或两个以上的反向平曲线
【单选题】 一般在城市市区和建筑密度较大,交通频繁地区,均采用()
①  明沟系统
②  人工疏导系统
③  暗管系统
④  混合式系统
【单选题】 某十字交叉口的红灯20秒,黄灯3秒,绿灯15秒,该交叉口的信号周期为()
①  20秒
②  41秒
③  15秒
④  38秒
【单选题】 下列不属于主线横面的是()
①  车行道
②  路缘带
③  分车带
④  路旁建筑物
【单选题】 道路通行能力的研究主体不包括()
①  机动车
②  非机动车
③  行人
④  驾驶员
【单选题】 管道埋深最小覆土厚度一般不小于()m。
①  0.9
②  0.6
③  0.3
④  0.7
【单选题】 下列交通信号的类型中,不属于按照交通信号的变换方式划分的是()
①  人工操作的
②  定周期自动循环的
③  不定周期自动控制的
④  线控制
【单选题】 下列情况可考虑设计集散车道的是()
①  通过车道交通量大
②  两个以上出口分流岛端部相距很远
③  三个以上出口分流岛端部相距很远
④  所需的交织长度能得到保证