java选择题库概要.doc

java选择题库概要

11111111111111 单选题第一套 表1 考核知识点一览表 知识点 内 容 题型 题数(实际) 题目名称 1 JAVA应用程序 单选 1 1-1-1-1 2 类 单选 1 3 JAVA关键字 单选 1 4 JAVA变量和数据类型 单选 2 1-1-2-1,1-1-3-1 5 环境 单选 0 6 运算符与表达式 单选 2 7 流程控制 单选 1 8 数组 单选 1 9 重载 单选 1 10 构造函数 单选 1 11 抽象类 单选 1 12 继承 单选 1 13 对象 单选 1 14 覆盖与重载 单选 1 1-1-1-1下面的main()方法的定义哪些是正确的?( ) (A)public static void main(String args){} (B)public static void main(String[]){} (C)public static void main(String[] args){} (D)public static void MAIN(String[] xyz){} 答案:C 1-1-2-1用于定义简单数据类型的一组关键字是( ) Student,float,main,public byte,boolean,int,float (C)long,extends,float,double (D)class,float,short,import 答案:B 1-1-3-1以下变量定义中正确的是( ) (A)int I=123a (B)float f=7.8f (C)char c=’abc’ (D)String str=’d’ 答案:B 1-1-4-1 for(;;)是( ) (A)循环结构 (B)分支结构 (C)顺序结构 答案:A 1-1-5-1设类B和类C都不是抽象类,且类B是类C的父类。下列声明对象x1的语句中不正确的是( ) (A) B x1=new B() (B) B x1=new C() (C) C x1=new C() (D) C x1=new B() 答案:D 1-1-6-1设有对象x具有属性a则访问该属性的方法为( ) (A) a.x (B) a.x() (C) x.a (D) x.a() 答案:C 1-1-7-2定义变量如下: int i=18; long L=5; float f=9.8f; double d=1.2; String s=”123”; 以下赋值语句不正确的是( ) (A)L=f+i (B)f=L+i (C)s=s+i (D)s=s+i+f+d 答案:A 1-1-8-2下面表达式的值的类型为( ) (int)(8/9.2*5) (A)short (B)int (C)double (D)float 答案:B 1-1-9-2 设数组Array由以下语句定义 int Array=new int[10], 则数组最后一个元素的正确引用方法为( ) (A)Array[10] (B)Array[9] (C)array[10] (D)array[9] 答案:B 1-1-10-2 定义类A如下:( ) class A { int a,b,c; public void B(int x,int y,int z){ a=x;b=y;c=z;} } 下面对方法B()的重载哪些是正确的( )? public void A(int x1,int y1,int z1){a=x;b=y;c=z;} public void B(int x1,int y1,int z1){a=x;b=y;c=z;} public void B(int x,int y){a=x;b=y;c=0;} public B(int x,int y,int z){a=x;b=y;c=z;} 答案:C 1-1-11-2定义一个类Point,类中有两个double型变量x和y,对于其构造函数的声明不正确的是( ) (A) public Point(Point p ){…} (B) public Point(int x ){…} (C) public Point(int x,int y ){…} (D) Point Point(int x ){…} 答案:D 1-1-12-2 以public修饰的类如:public class Car{…} 则C

文档评论(0)

1亿VIP精品文档

相关文档