java笔试试题集合
90页1、1 Copyright Tarena Corporation,2009.All rights reserved JAVASEJAVASE 部分部分 1、Choose the three valid identifiers from those listed below. (Choose three)? A. IDoLikeTheLongNameClass B. $byte C. const D. _ok E. 3_case 答:ABD 2、Which of the following lines of code will compile without error (Choose two)? A. int i=0; if (i) System.out.println(“Hi”); B. boolean b=true; boolean b2=true; if(b=b2) System.out.println(“So true”); C. int i=1; int j=2; if(i=1| j=2) System.out.println(“OK”); D. int i=1; int j=2
2、; if (i=1 答:BC 3、Which two demonstrate a “has a“ relationship(Choose two)? A. public interface Person public class Employee extends Person B. public interface Shape public interface Rectandle extends Shape C. public interface Colorable public class Shape implements Colorable D. public class Species 2 Copyright Tarena Corporation,2009.All rights reserved public class Animalprivate Species species; E. interface Component class Container implements Component private Component children; 答:DE 4、What
3、will happen when you attempt to compile and run the following code? public class Static static int x = 5; static int x,y; public static void main(String args) x-; myMethod(); System.out.println(x + y + +x); public static void myMethod() y = x+x; A.compiletime error B.prints: 1 C.prints: 2 D.prints: 3 E.prints: 7 F.prints: 8 答:D 5、What is the correct ordering for the import, class and package declarations when found in a single file? A. package, import, class B. class, import, package C. import,
4、package, class D. package, class, import 答:A 6、What will happen when you attempt to compile and run the following code. public class Pvf static boolean Paddy; public static void main(String argv) System.out.println(Paddy); 3 Copyright Tarena Corporation,2009.All rights reserved A. Compile time error B. compilation and output of false C. compilation and output of true D. compilation and output of null 答:B 7、Given the folowing classes which of the following will compile without error? interface IF
《java笔试试题集合》由会员小**分享,可在线阅读,更多相关《java笔试试题集合》请在金锄头文库上搜索。
2020年高考真题——理科综合(全国卷Ⅲ)+Word版含答案
2021年绝味鸭脖策划书
2021年熟食店创业方案
2021年熟食店开店策划
2021年卤菜店创业计划书
2021年周黑鸭网络营销策划方案
东大21年1月考试《现代设计方法》考核作业
谈我国行政管理效率的现状及其改观对策(论文)
单证员考试-备考辅导-复习资料:无贸易背景信用证案分析.docx
土木工程毕业生答辩自述.docx
建筑学毕业后工作状态真实写照.doc
C#代码规范(湖南大学).doc
xx区食药监局2019年工作总结及2020年工作计划
2019年中医院药物维持治疗门诊工人先锋号先进事迹
2019年度xx乡镇林长制工作总结
2019年性艾科工作计划书
2019年人才服务局全国扶贫日活动开展情况总结
关于组工信息选题的几点思考
摘了穷帽子 有了新模样
2019年某集团公司基层党支部书记培训班心得体会
2024-04-08 33页
2024-04-08 10页
2024-04-08 25页
2024-04-08 12页
2024-04-08 10页
2024-04-08 21页
2024-04-08 40页
2024-04-08 34页
2024-04-08 28页
2024-04-08 28页