【单选题】【消耗次数: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));
随机题目
【多选题】 标准包括()。
①  企业标准
②  地方标准
③  行业标准
④  国家标准
⑤  团体标准
【多选题】 鉴定人出庭作证时,应()地回答与鉴定事项有关的问题。
①  客观
②  依法
③  有针对性
④  公正
【多选题】 鉴定人应根据()制定鉴定方案。
①  鉴定事项
②  鉴定目的
③  鉴定项目的特点
④  鉴定要求
【单选题】 1931年1月7日,六届四中全会举行,王明当选为中央政治局委员,王明坚持()
①  城市中心论
②  工人中心论
③  农村中心论
④  农民中心论
【单选题】 我国应当怎样巩固拓展脱贫攻坚成果?()
①  健全防止返贫的动态监测、帮扶机制
②  增设慈善机构
③  健全扶贫机制
④  大力帮扶贫困地区
【单选题】 根据“邓小平理论”,四项基本原则是社会主义发展的()。
①  外部条件
②  政治保证
③  发展动力
④  根本任务
【单选题】 近几年中国在全球治理体系当中站在道德制高点,站在全球制高点,积极推动、维护多边主义,反对保护主义,推进()的共同建设。
①  G20
②  反恐
③  “一带一路”
④  人类命运共同体
【单选题】 一号文件中指出,永久基本农田应当用于以下哪种作物?()
①  粮食
②  棉花
③  油料
④  糖料
【单选题】 我国目前推行的是()年义务教育。
①  18
②  6
③  12
④  9
【单选题】 民主革命时期的第一次严重挫折是()。
①  土地革命失败
②  大革命失败
③  第一次国共合作失败
④  “左倾”思想蔓延