JAVA双语教学考试试卷及答案B

上传人:公**** 文档编号:507016973 上传时间:2022-09-28 格式:DOCX 页数:13 大小:34.29KB
返回 下载 相关 举报
JAVA双语教学考试试卷及答案B_第1页
第1页 / 共13页
JAVA双语教学考试试卷及答案B_第2页
第2页 / 共13页
JAVA双语教学考试试卷及答案B_第3页
第3页 / 共13页
JAVA双语教学考试试卷及答案B_第4页
第4页 / 共13页
JAVA双语教学考试试卷及答案B_第5页
第5页 / 共13页
点击查看更多>>
资源描述

《JAVA双语教学考试试卷及答案B》由会员分享,可在线阅读,更多相关《JAVA双语教学考试试卷及答案B(13页珍藏版)》请在金锄头文库上搜索。

1、班 级 学 号 姓 名 密封装订线 密封装订线 密封装订线B卷注意事项:请将各题答案按编号顺序填写到答题卷上,答在试卷上无效。一、 单选题(本题共40小题,每小题1分,共40分)1. What is the return-type of the methods that implement the MouseListener interface?A. booleanB. BooleanC. voidD. Point2. Select valid identifier of Java:A. %passwdB. 3d_gameC. $chargeD. this3. Which declares a

2、n abstract method in an abstract Java class?A. public abstract method();B. public abstract void method();C. public void abstract Method(;D. public abstract void method() 4. Which statement about listener is true?A. Most component unallow multiple listeners to be added.B. If multiple listener be add

3、to a single component, the event only affected one listener.C. Component dont allow multiple listeners to be add.D. The listener mechanism allows you to call an addXxxxListener method as many times as is needed, specifying as many different listeners as your design require.5. Which method you define

4、 as the starting point of new thread in a class from which new the thread can be excution?A. public void start()B. public void run() C. public void int()D. public static void main(String args) 6. Which statement is correctly declare a variable a which is suitable for refering to an array of 50 strin

5、g empty object?A. String aB. String aC. char aD. String a50 7. Which cannot be added to a Container?A. a MenuB. a ComponentC. a ContainerD. an Applet8. Which is the main() methods return of a application?A. StringB. byteC. charD. void9. Which is corrected argument of main() method of application?A.

6、String argsB. String arC. Char argsD. StringBuffer arg10. Float s=new Float(0.9F);Float t=new Float(0.9F);Double u=new Double(0.9);Which expressions result is true?A. s=tB. s.equals(t)C. s=uD. t.equals(u)11. Which are not Java keyword?A. gotoB. nullC. FALSED. const12. Run a corrected class: java cs

7、AClass a b c Which statement is true?A. args0=”-cs”;B. args1=”a b c”;C. args0=”java”;D. args0=”a”; 13. Short answer:The decimal value of i is 12, the octal i value is: A. 14B. 014C. 0x14D. 01214. Short answer:The decimal value of i is 7, the hexadecimal i value is:A.7B. 07C. 0x7D. x0715. Which is th

8、e range of char?A. -2727-1B. 0216-1C. 0216D. 02816. Which statement is true about an inner class?A. It must be anonymousB. It can not implement an interfaceC. It is only accessible in the enclosing classD. It can access any final variables in any enclosing scope.17. What is written to the standard o

9、utput given the following statement:Select the right answer:A.4B.5C.6D.7 18. A class design requires that a particular member variable must be accessible for direct access by any subclasses of this class. but otherwise not by classes which are not members of the same package. What should be done to

10、achieve this?A. The variable should be marked publicB. The variable should be marked privateC. The variable should be marked protectedD. The variable should have no special access modifier19. main方法是Java Application程序执行的入口点,关于main方法的方法头以下哪项是合法的( )? A)public static void main( ) B)public static void m

11、ain( String args ) C)public static int main(String arg ) D)public void main(String arg )20. 下面哪种注释方法能够支持javadoc命令: A)/*.*/ B) /*.*/ C)/ D)/*.*/21. Java Application源程序的主类是指包含有( )方法的类。 A)main方法 B)toString方法 C)init方法 D)actionPerfromed方法22. Java的字符类型采用的是Unicode编码方案,每个Unicode码占用( )个比特位。 A)8 B)16 C)32 D)6

12、423. 设 a = 8,则表达式 a 2 的值是( )。 A)1 B)2 C)3 D)4 24. 若需要定义一个类域或类方法,应使用哪种修饰符?( ) A)static B)package C)private D)public25. 若在某一个类定义中定义有如下的方法: abstract void performDial( ); 该方法属于()。 A)本地方法 B)最终方法 C)解态方法 D)抽象方法26. 下列关于静态初始化块的叙述中,哪一个是正确的?() A)静态初始化块是在构造函数之前加上static修饰符。 B)静态初始化块是对类自身进行初始化。 C)静态初始化块在同一个类中只能有一

13、个。 D)静态初始化块是在其所属的类加载内存时由系统自动调用执行。27. 不使用static修饰符限定的方法称为对象(或实例)方法,下列哪一个说法是正确的?() A)实例方法可以直接调用父类的实例方法。 B)实例方法可以直接调用父类的类方法。 C)实例方法可以直接调用其他类的实例方法。 D)实例方法可以直接调用本类的类方法。28. 设有下面两个类的定义: class Person class Student extends Person long id; / 身份证号 int score; / 入学总分 String name; / 姓名 int getScore() return score; 问:类Person和类Student的关系是( )。 A)包含关系 B)继承关系

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 习题/试题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号