当前位置:SCJP程序员认证考试题库

问题:

[单选] A public member vairable called MAX_LENGTH which is int type, the value of the variable remains constant value 100. Use a short statement to define the variable.()   

A .  public int MAX_LENGTH=100;
B .  final int MAX_LENGTH=100;
C .  final public int MAX_LENGTH=100;
D .  public final int MAX_LENGTH=100;

空压机压力一般调节调整为() 0.45-0.65MPa。 0.55-0.75MPa。 0.55-0.85MPa。 在学理上,我国学者对证据有哪些分类? 若单向桥式整流电路中有一只二极管断路,则该整流电路()。 不能工作。 仍能正常工作。 输出电压下降。 输出电压下降或不能工作。 Which expressions are correct to declare an array of 10 String objects? ()     char str[];。  char str[][];。  String str[];。  String str[10];。 Google网站管理员工具有什么功能?() 提交网站地图sitemap。 修改robots文件。 统计网站流量。 修改网站域名。 A public member vairable called MAX_LENGTH which is int type, the value of the variable remains constant value 100. Use a short statement to define the variable.()   
参考答案:

  参考解析

Java中共有变量使用public定义,常量变量使用final,另外注意的是修饰符的顺序,一个最完整的修饰是public static final int varial_a=100;这个顺序不能错,这和c++中也是 不同的。而答案c恰恰错在修饰符的顺序上。

在线 客服