奥鹏作业答案-谋学网-专业的奥鹏在线作业答案辅导网【官网】

 找回密码
 会员注册

微信登录,扫一扫

手机号码,快捷登录

VIP会员,3年作业免费下 !奥鹏作业,奥鹏毕业论文检测新手作业下载教程,充值问题没有找到答案,请在此处留言!
2022年5月最新全国统考资料投诉建议,加盟合作!点击这里给我发消息 点击这里给我发消息
奥鹏课程积分软件(2021年最新)
查看: 657|回复: 0

川农《JAVA语言基础(本科)》20年12月作业考核(资料)

[复制链接]
发表于 2020-11-14 23:23:17 | 显示全部楼层 |阅读模式
谋学网
资料来源:谋学网(www.mouxue.com)-[四川农业大学]《JAVA语言基础(本科)》20年12月作业考核
试卷总分:100    得分:100
第1,类Test1定义如下:
public  class  Test1{public  float  aMethod(float  a,float  b){   }}
将以下哪种方法插入行3是不合法的。(           )
A、public  float  aMethod(float  a, float  b,float  c){  }
B、public  float  aMethod(float  c,float d){  }
C、public  int  aMethod(int  a, int b){  }
D、private float aMethod(int a,int b,int c){  }
正确资料:


第2题,以下哪个表达式是不合法的(         )
A、String   x="Hello";  int  y=9;   x+=y;
B、String  x="Hello";   int  y=9;  if(x= =y)  { }
C、String   x="Hello";  int  y=9;  x=x+y;
D、String   x=null;  int  y=(x!=null)&&(x.length()0) ? x.length : 0
正确资料:


第3题,编译运行以下程序后,关于输出结果的说明正确的是 (        )public  class   Conditional{public  static  void  main(String  args[  ]){ int  x=4;   System.out.println("value  is  "+ ((x4) ? 99.9 :9)); }}
A、输出结果为:value  is  99.99
B、输出结果为:value  is  9
C、输出结果为:value  is  9.0
D、编译错误
正确资料:


第4题,执行完以下代码int [ ]x = new int[25];后,以下哪项说明是正确的(         )
A、x[24]为0
B、x[24]未定义
C、x[25]为0
D、x[0]为空
正确资料:


资料来源:谋学网(www.mouxue.com),类Test1定义如下: public  class  Test1{public  float  aMethod(float  a,float  b){   } }将以下哪种方法插入行3是不合法的。(           )
A、public  float  aMethod(float  a, float  b,float  c){  }
B、public  float  aMethod(float  c,float d){  }
C、public  int  aMethod(int  a, int b){  }
D、private float aMethod(int a,int b,int c){  }
正确资料:


第6题,编译并运行以下程序(命令:java  TestClass  0),关于运行结果的描述以下哪个选项是正确的(          )class  TestClass{public  static  void  main(String [ ]  args){long   i=0;try{i=Integer.parseInt(args[0]);}catch(Exception  e){   }switch(i){case  0:  System.out.
A、编译出错
B、打印出"0"
C、打印出"1"
D、打印出"default"
正确资料:


第7题,main方法是Java  Application程序执行的入口点,关于main方法的方法头以下哪项是合法的( )
A、public  static  void  main()
B、public  static  void   main(String[ ]  args)
C、public static int  main(String[ ]  arg)
D、public  void  main(String  arg[ ])
正确资料:


第8题,以下哪项可能包含菜单条(   )
A、Panel
B、Frame
C、Applet
D、Dialog
正确资料:


第9题,执行完以下代码int [ ]  x = new  int[25];后,
以下哪项说明是正确的( )
A、x[24]为0
B、x[24]未定义
C、x[25]为0
D、x[0]为空
正确资料:


资料来源:谋学网(www.mouxue.com),以下说法哪项是正确的(         )class  MyListenerextends  MouseAdapter  implements  MouseListener{public void mouseEntered(MouseEvent  mev){ System.out.println("Mouse  entered.");  }}
A、以上代码可通过编译
B、不能通过编译,因为没有实现MouseListener接口中的所有方法
C、不能通过编译,因为类头定义不能分行
D、能通过编译,若组件用该类作为Mouse的监听者并且接收了mouse-exited事件,则在执行过程中会抛出异常
正确资料:


第11题,5、编译运行以下程序后,关于输出结果的说明正确的是 ( )
public  class   Conditional{
public  static  void  main(String  args[  ]){
int  x=4;
System.out.println("value  is  "+ ((x4) ? 99.9 :9)); }}
A、输出结果为:value  is  99.99
B、输出结果为:value  is  9
C、输出结果为:value  is  9.0
D、编译错误
正确资料:


资料来源:谋学网(www.mouxue.com),以下代码段执行后的输出结果为()int  x=3; int  y=10;
System.out.println(y%x);
A、0
B、1
C、2
D、3
正确资料:


第13题,一个线程的run方法包含以下语句,假定线程没有被打断,以下哪项是正确的(      )
1.try{
2.    sleep(100);
3. }catch(InterruptedException  e){  }
A、不能通过编译,因为在run方法中可能不会捕捉到异常。
B、在第2行,线程将暂停运行,正好在100毫秒后继续运行。
C、在第2行,线程将暂停运行,最多在100毫秒内将继续运行。
D、在第2行,线程将暂停运行,将在100毫秒后的某一时刻继续运行。
正确资料:


第14题,以下选项中循环结构合法的是(          )
A、while (int  i7) {i++;System.out.println("i is "+i); }
B、int  j=3; while(j)   {  System.out.println(" j  is "+j); }
C、int  j=0; for(int  k=0; j + k !=10; j++,k++){    System.out.println(" j  is "+ j + "k  is"+ k); }
D、int  j=0; do{System.out.println( "j  i
正确资料:


资料来源:谋学网(www.mouxue.com),下列关于修饰符混用的说法,错误的是(          )
A、abstract不能与final并列修饰同一个类
B、abstract类中不可以有private的成员
C、abstract方法必须在abstract类中
D、staic方法中能处理非static的属性
正确资料:


第16题,以下哪项可能包含菜单条()
A、Panel
B、Frame
C、Applet
D、Dialog
正确资料:


第17题,以下代码完成画线功能,指出所画线的颜色()g.setColor(Color.red.green.yello.cyan); g.drawLine(0,0,100,100);
A、red
B、green
C、yello
D、cyan
正确资料:


第18题,以下标识符中哪项是不合法的(         )
A、BigMeaninglessName
B、$int
C、1 st
D、$1
正确资料:


第19题,关于以下application的说明,正确的是()class   StaticStuff {                  static  int  x=10;                  static  { x+=5;}                  public  static  void  main(String  args[ ])                  {                       System.out.println("x=" + x);
A、4行与9行不能通过编译,因为缺少方法名和返回类型
B、9行不能通过编译,因为只能有一个静态初始化器
C、编译通过,执行结果为:x=5
D、编译通过,执行结果为:x=3
正确资料:


资料来源:谋学网(www.mouxue.com),以下哪个接口的定义是正确的?(              )
A、interface  A
{  void print()  {  } ;}
B、abstract  interface  A
{ void print() ;}
C、abstract  interface  A  extends I1, I2  //I1、I2为已定义的接口
{ abstract  void  print(){  };}
D、interface  A
{  void  print();}
正确资料:














本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?会员注册

×
奥鹏作业答案,奥鹏在线作业答案
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

 
 
客服一
客服二
客服三
客服四
点这里给我发消息
点这里给我发消息
谋学网奥鹏同学群2
微信客服扫一扫

QQ|关于我们|联系方式|网站特点|加入VIP|加盟合作|投诉建议|法律申明|Archiver|小黑屋|奥鹏作业答案-谋学网 ( 湘ICP备2021015247号 )

GMT+8, 2024-4-28 11:34 , Processed in 0.099699 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表