Java工程师认证工信部考试
Java认证考试资料(ATA)
Java认证资料1简单变量和引用变量在作为类的成员这是时,有什么区别?(D)A.简单成员变量不需要初始化,引用变量需要在构造函数中初始化B.引用成员变量不需要初始化,简单成员变量需要在构造函数中初始化C.类的成员变量可以自动初始化,因此没有区别D.简单成员变量会自动初始化为默认值(0),而引用变量只会自动初始化为空值,实际使用时还需要将它指向一个对象2以下列出的在小程序的载入阶段,需要进行的工作中,错误的是(B)A.调用小程序对象的init函数,对小程序自身进行初始化B.从网上下载小程序的其余部分C.创建一个小程序对象,它必须是Applet类的子类D.调用小程序对象的start函数,启动小程序3在JBuilder中编译、运行程序的方法是(D )A.在菜单中先“Run executable file”,JBuilder会自动完成编译源程序、连接目标文件、运行可执行文件这三个步骤B.在菜单中选“Make Project”以编译工程,之后在命令行方式下键入:“JBuilder HelloWorld”以运行Java程序C.在菜单中选“Compile all source files”以编译所有的Java源程序,再选“Link all object file”以将编译后的目标文件...D.在菜单中选择“Make Project”以编译工程,再从菜单中选“Run Project”以运行Java程序4构造函数能否被子类继承?(D)A.可以被继承B.可以被继承,但子类如果有自己的构造函数的话会覆盖父类C.不能被继承,父类的构造函数不再使用D.不能被继承,但调用子类的构造函数之前会先自动调用父类的构造函数5关于函数的返回值,以下描述中错误的是(BC)A.如果函数定义中有返回值,那么函数中就必须保证任何情况下都能通过return 语句返回一个值,否则编译时会出错B.一个函数中只能有一条return语句,而且它必须位于函数的最后一行C.如果函数定义中没有返回值,那么这个函数就不能用return语句返回D.如果函数定义中有返回值,那么这个函数就必须通过return语句返回一个值E.函数通过return语句返回值6接口如何实现?(B)A.利用一个继承自接口的类来实现B.利用类来实现,在类定义部分用"implements"关键字表示这个类所实现的接口C.利用与接口同名的类来实现D.利用一系列全局函数来实现7以下函数中,不是Object类所有的是(B)A.notifyB.valueOfC.toStringD.wait8以下列出的JBuilder可以产生的可执行程序中,哪个是错误的?(D)A.LinuxB.Mac OSC.WindowsD.DOS9组件与模型分离的作用是什么?(B)A.更准确地设置组件的状态B.可以更高效地对组件进行操作,并且也更容易在组件之间共享和数据C.跳过事件处理类,直接处理组件的事件D.数据更准确10在Java中,有哪些图形界面开发工具包?(A)A.AWT和SwingB.MFC和AWTC.MFC和SwingD.MFC和JFC11在创建了JFrame对象之后,应当调用对象的pack函数,这个函数使框架变成它合适的大小。
程序设计工程师技术水平证书(JAVA)考试大纲
程序设计工程师技术水平证书(JAVA)考试大纲程序设计工程师技术水平证书(JAVA)考试大纲一、考试性质和目的:本考试的目的在于促使考生掌握JAVA语言与面向对象程序设计的概念、方法与基本技术。
并注重提高考生运用Java语言和面向对象技术解决问题的能力,使其具备独立完成各种设计项目的能力,达到程序设计工程师的水平。
二、考试说明1.考试形式:应用工业和信息化部电子教育与考试中心考试系统,上机考试。
2.考试分值比例:程序设计工程师技术水平证书(JA V A)技术水平证书考试试卷由理论考试和实践考试两部分组成。
试卷总分值为100分,其中理论题占30分,实践题占70分。
1.考试时间:150分钟。
4.考核目标:全面考察学生对考生掌握JA V A语言与面向对象程序设计的概念、方法与基本技术的掌握水平。
三、考试内容第1章Java语言概述1.1 Java语言的形成与发展1.2 Java语言特点1.3 Java程序工作方式1.4 JDK实用程序1.5 Java程序类型1.6 Java语言编码规范第2章Java语言基础2.1 Java程序的结构2.2 表达式规则2.3 流程控制语句2.4 数组与字符串第3章Java面向对象程序设计(上)3.1 面向对象求解概述3.2 类与对象3.3 类的组合与嵌套3.4 继承3.5 多态第4章Java面向对象程序设计(下)4.1 静态变量和静态方法4.2 抽象类和抽象方法4.3 最终类和最终方法4.4 包4.5 修饰符和访问控制4.6 接口第5章java语言基础类库5.1 Java类库5.2 Java语言包(ng)5.3 Java实用程序包(java.util)5.4 Java文本包(java.text)5.5 Java数学包(java.math)第6章java程序中的异常处理6.1 程序异常概念6.2 异常与异常类6.3 异常处理6.4 异常处理原则第7章Java程序中的输入输出7.1 Java流式输入输出概述7.2 字节流类7.3 字符流类7.4 缓冲流类7.5 对象流类7.6 文件操作第8章Java数据库编程接口8.1 数据库基础知识8.2 建立Access数据库实例8.3 SQL语言入门8.4 JDBC与数据库访问第9章综合案例9.1 案例提出9.2 案例分析9.3 类的设计9.4 编码实现第10章Java开发环境与工具10.1 JDK开发工具10.2 Eclipse继承开发环境四、考试样题试题一单选择题下列关于变量及其范围的陈述中不正确的是()。
《全国信息技术高级人才水平考试》软件工程师(Java)考试大纲
《全国信息技术高级人才水平考试》软件工程师(Java)考试大纲(初级)一、考试说明软件开发工程师(Java)考试内容覆盖了Java程序员、专业软件公司Java软件工程师、手机软件开发工程师、网络公司Java程序员等职位所要求的基本职业知识与技能,突出强调并着重考查考生的阅读需求能力、编码能力、排错能力和协作能力。
二、考试对象已完成NIEH课程“初级软件工程师”的学习,深入透彻掌握行业先进技术和行业规范的学习者。
三、考试题型:单选题:1. Java 源文件中关键字出现顺序正确的是( )。
A. package import classB. package class importC. class package importD. import package class答案:A2. 如下代码:public class Demo{public static void main(String[] args){int[] ary = new int[3];System.out.println(ary[2]);}}运行结果是( )A. 3B. 2C. 1D. 0答案:D3. 用于向SQL数据库表中增加一行的SQL语句关键字是( ) A. SELECT B. INSERT C. UPDATE D. CREATE答案:B4. Java中基本类型char的包装类是( )A. StringB. CharC. ChrD. Character 答案:D多选题:1. 关于Java程序入口方法main,如下声明正确的是( )。
A. public static void main(String[] args)B. public static void main(String args)C. public static final void main(String[] args)D. public static void main(String[] arg)E. void main(String[] arg)答案:A,C,D1. 下面那些语句行符合正确的Java语法( )。
工信部java高级工程师申请流程
工信部java高级工程师申请流程下载提示:该文档是本店铺精心编制而成的,希望大家下载后,能够帮助大家解决实际问题。
文档下载后可定制修改,请根据实际需要进行调整和使用,谢谢!本店铺为大家提供各种类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by this editor. I hope that after you download it, it can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you! In addition, this shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!工信部Java高级工程师申请流程在申请工信部Java高级工程师资格时,需要按照以下流程逐步操作:1. 准备材料。
NIIT认证Java考试题库
NIIT认证Java考试题库NIIT认证Java考试题库NIIT的工作领域包括系统合成,商业对策,工程,制造,财务,网络工程,通讯,信息技术咨询,应用软件开发,多媒体软件及职业信息技术培训和企业信息技术培训。
下面一起来看看NIIT认证的java 考试题库,希望能帮助到大家!JDK是( )A、一种全新的程序语言B、一种程序开发辅助工具C、一种由Java写成的,并支持Java Applet的浏览器D、一种游戏软件2、Java语言中下面哪个可以用作正确的变量名称( )A、3DB、nameC、extendsD、implements3、构造函数何时被调用( )A、类定义时 B.创建对象时C.调用对象方法时D.使用对象的变量时4、Java中,哪种不可以用来限制存取权限的关键字( )A、publicB、protectedC、extendsD、private5、要想定义一个不能被实例化的抽象类,在类定义中必须加上修饰符( )。
A、 finalB、 publicC、 privateD、abstract6、Java源文件和编译后的文件扩展名分别为( )A、.class和 .javaB、.java和 .classC、.class和 .classD、.java和 .java7、若已定义 byte[ ] x= {11,22,33,-66} ; 其中0≤k≤3,则对x数组元素错误的引用是( )。
A、 x[5-3]B、 x[k]C、 x[k+5]D、 x[0]8、下列语句序列执行后,i 的值是( )。
int i=8, j=16;if( i-1 > j ) i--; else j--;A、 15B、 16C、 7D、 89、下列语句序列执行后,i的值是( )。
int i=16;do { i/=2; } while( i > 3 );A、 16B、 8C、 4D、 210、不能构成循环的语句是( )。
A、for 语句B、while 语句C、switch 语句D、do while 语句11.欲构造ArrayList类的一个实例,此类继承了List接口,下列哪个方法是正确的 ?A、 ArrayList myList=new Object();B、 List myList=new ArrayList();C、 ArrayList myList=new List();D、 List myList=new List();12、给出下面代码:public class Person{static int arr[] = new int[10];public static void main(String a[]){System.out.println(arr[1]);}}那个语句是正确的?A、编译时将产生错误;B、编译时正确,运行时将产生错误;C 、输出零;D、输出空。
工信部java工程师证书的申请方式
工信部java工程师证书的申请方式
要申请工信部Java工程师证书,可以按照以下步骤进行:
1. 登录中国工信部官方网站,找到相关证书申请页面。
2. 阅读申请要求和条件,确保自身符合申请条件。
3. 准备必要的申请材料,一般包括身份证复印件、学历证明、工作经历证明等。
4. 填写申请表格,填写个人信息、教育背景、工作经历、培训经历等。
5. 缴纳申请费用,一般可以通过网上支付或银行转账等方式完成。
6. 提交申请材料,将填写好的申请表格和相关证明材料通过工信部官方网站的在线申请系统递交。
7. 等待审批结果,一般会有一定的审批周期,需耐心等待。
8. 如审批通过,会收到证书发放通知。
具体的申请流程和材料要求可能会根据不同地区和政策有所不同,建议在申请前先查阅相关的官方网站或咨询工信部相关部门获得最新准确的信息。
java华为可信考试题库及答案
java华为可信考试题库及答案1. Java中,哪个关键字用于声明一个类?A. classB. publicC. privateD. void答案:A2. 在Java中,下列哪个选项不是合法的变量名?A. _variableNameB. variableNameC. 2variableNameD. $variableName答案:C3. Java中,如何声明一个整型变量并初始化为10?A. int number = 10;B. int number = "10";C. int number = 10.0;D. int number = '10';答案:A4. Java中,下列哪个选项是正确的数组声明方式?A. int[] myArray;B. int myArray[];C. int[] myArray = {1, 2, 3};D. All of the above答案:D5. 在Java中,哪个关键字用于捕获异常?A. tryB. catchC. finallyD. throw答案:B6. Java中,下列哪个选项是正确的继承方式?A. public class Derived extends Base {}B. public class Derived implements Base {}C. Both A and BD. None of the above答案:A7. Java中,下列哪个选项是正确的接口实现方式?A. public interface MyInterface {}B. public class MyClass implements MyInterface {}C. Both A and BD. None of the above答案:C8. 在Java中,下列哪个选项是正确的方法重载声明?A. public void display(int number);B. public int display(int number);C. Both A and BD. None of the above答案:C9. Java中,下列哪个选项是正确的方法覆盖声明?A. public void display() {}B. public void display() throws Exception {}C. Both A and BD. None of the above答案:A10. 在Java中,下列哪个选项是正确的泛型类声明?A. public class Box<T> {}B. public class Box {}C. Both A and BD. None of the above答案:A11. Java中,下列哪个选项是正确的泛型方法声明?A. public <T> void show(T t) {}B. public void show(T t) {}C. Both A and BD. None of the above答案:A12. 在Java中,下列哪个选项是正确的匿名内部类声明?A. new Thread() {public void run() {System.out.println("Thread is running"); }};B. new Thread() {public void run() {System.out.print("Thread is running");}};C. Both A and BD. None of the above答案:C13. Java中,下列哪个选项是正确的线程启动方式?A. Thread t = new Thread();B. Thread t = new Thread();t.start();C. Both A and BD. None of the above答案:B14. 在Java中,下列哪个选项是正确的线程同步方式?A. synchronized methodB. synchronized blockC. Both A and BD. None of the above答案:C15. Java中,下列哪个选项是正确的集合框架类?A. ListB. SetC. MapD. All of the above答案:D。
20121225_工信部人才交流中心Java面试题V2.1
Java面试宝典2013版(蓝桥计划)项目介绍................................................................................................. 错误!未定义书签。
前言......................................................................................................... 错误!未定义书签。
一. Java基础部分.................................................................................. 错误!未定义书签。
1、请说一下break和continue的区别?...................... 错误!未定义书签。
2、switch 中用于判断的表达式,可以用哪些数据类型?错误!未定义书签。
3、char型变量中能不能存贮一个中文汉字?为什么?.... 错误!未定义书签。
4、静态变量和实例变量的区别?..................................... 错误!未定义书签。
5、是否可以从一个static方法内部发出对非static方法的调用?错误!未定义书签。
6、Integer与int的区别 ................................................... 错误!未定义书签。
7、Overload和Override的区别。
参数列表相同,返回值不同的方法,是否是重载方法?............................................................................. 错误!未定义书签。
8、接口是否可继承接口? 抽象类是否可实现(implements)接口? 抽象类是否可继承具体类(concrete class)?.............................................. 错误!未定义书签。
Java工程师认证工信部考试
工业和信息化产业部中级JAVA软件工程师考试学校:____________ 学号:____________ 姓名:______________注意:考试时间为120分钟,试卷总分100分,闭卷考试,请遵守考场纪律,考试严禁作弊,作弊者立即停止考试,成绩按0分处理。
到时间收卷,延迟交卷按作弊处理。
多项选择会在题目后提示多选,没有提示说明默认是单选,并将选择题答案填入最后的答题卡中。
一、选择题 (共20题,每题2分, 共40分)1)以下代码编译报错的是? DA. double a = 129;B.int a = 129;C. short a = 129;D.byte a = 129;2)以下是JAVA基本数据类型的是?(多选)ACA. intB. StringC. doubleD. Boolean 基本数据类型short,boolean,开头大写为引用数据类型。
除Integer为int的改写3)下面不是JAVA关键字的是? BCA. breakB. stringC. retrunD. throw return4)以下哪个异常类型描述的是引用未初始化? AA. NullPointerExceptionB. ClassCastException 类型转换异常C. NumberFormatException 数据不匹配D. IndexOutOfBoundsException 下标越界5)执行下面程序,输出的结果是?B1,public class Test{2, public static void main(String[] args){ 3, int a = 5;4, double b = 8;5, a = a++ + b; int型不够装入double型6, System.out.println(a);7, }8, }A.第4行编译报错B.第5行编译报错C.编译成功,输出13D.编译成功,输出146)在 Java API 文档中哪些节是包含在class 文档内的?(多选)ABCA、class的描述以及相关内容B、成员变量列表C、类的层次结构图D、父类的方法列表7)关于被保护访问控制符protected修饰的成员变量,以下说法错误的是? BA、能被同一包内的类访问,也能被同一包内的子类访问B、只可以被两种类访问和引用:该类本身、该类的所有子类C、可以被三种类所引用:该类本身、与它在同一个包中的其他类、在所有继承该类的子类D、能被同一包内的类访问,也能被其它包内的子类访问//prptected可以被同一包的类、该类的所有子类(同包&不同包)访问,可以被该类本身,同一包的其他类和其所有继承的子类引用8)以下哪个可以用来描述文件和目录对象? AA、FileB、DirectoryC、FileDescriptorD、FileNameFilter9)执行以下代码会输出什么结果? Bpublic class Test {String getStr(String s){return s + “hello”;}public static void main(String arg[]) {Test t= new Test();System.out.println(t.getStr(“LiLei\n”));}}A. 编译报错B. LiLeihelloC. LiLeihelloD. 无任何输出10)下面程序的输出结果是? Apublic class Test{public static void main(String[] args){String s = “abc dsf ghi”;String[] arr = s.split(“\s”);//变成\\s System.out.println(arr.length);}}A.编译报错B.2C.1D.311)以下的程序的执行结果为? C1public class Demo{2 public double getHeight(){3 return 171.0;4 }5 public int getHeight (){6 return 171;7 }8 public static void main(String[] args){9 Demo demo = new Demo();10 System.out.println(demo.getHeight());11 }12 }A.输出171.0B. 输出171C. 第2行和第5行编译报错D. 第10行编译报错12)执行以下代码后,下面哪些描述是正确的? C1 public class Student{2 private String name = “Jema”;3 public void setName(String name){4 = name;5 }6 public String getName(){7 return ;8 }9 public static void main(String[] args){10 Student s;11 System.out.println(s.getName());12 }13 }A.输出nullB.第10行编译报错C.第11行编译报错D. 输出Jema13)JAVA面向对象的特征有? (多选)ACDA. 封装;B. 类;C. 继承;D. 多态;14)以下是JAVA中正确的入口方法是? AA. public static void main(String[] args){}B. public static void main(String args){}C. public void main(String[] args){}D. public static int main(String[] args){}15)关于JAVA赋值,下面哪些值的说明是正确的(多选)? ABCA. '\n'是表示char类型的换行字符;B. 010是表示8进制的int类型值;C. 1.0f表示float类型的值;D. 20L是表示int类型的值;//L表示long16)阅读以下代码:Dpublic class Test{public static void main(){System.out.println(“x=”+x);}}请问,代码运行的结果是?A. xB. x=xC. “x=”+5D. 编译报错17)执行以下代码,输出结果的结果是? C//静态的只能调用静态的,非静态的可调用静态的public class Test{public String[] ss = new String[5];public static void main(String[] args){System.out.println(ss[1]);//报错}}A. nullB. -1C. 编译时出错D. 运行时报错18)如下代码:public void Test() {try {oneMethod();System.out.println("condition 1");} catch (ArrayIndexOutOfBoundsException e) {System.out.println("condition 2");} catch(Exception e) {System.out.println("condition 3");} finally {System.out.println("finally");}}如果oneMethod正常运行,则输出结果中是?AA. condition 1 finallyB. condition 2 finallyC. condition 3 finallyD. finally //用于异常捕捉,无论是否会报异常,finally语句块都会执行。
工信部软考考试试题及答案
工信部软考考试试题及答案一、单项选择题(每题1分,共10分)1. 在软件开发过程中,需求分析阶段的主要任务是:A. 确定软件的功能和性能要求B. 编写软件的详细设计文档C. 进行软件的测试D. 编写用户手册答案:A2. 下列关于软件测试的描述,错误的是:A. 软件测试的目的是发现软件中的错误B. 软件测试可以证明软件没有错误C. 软件测试是软件开发过程中的一个重要环节D. 软件测试应该贯穿于软件开发的整个生命周期答案:B3. 在敏捷开发中,团队成员通常采用的沟通方式是:A. 正式会议B. 电子邮件C. 即时通讯D. 面对面交流答案:D4. 以下关于数据库系统的描述,正确的是:A. 数据库系统由数据、数据库管理系统和应用程序组成B. 数据库系统由数据、数据库管理系统和操作系统组成C. 数据库系统由数据、操作系统和应用程序组成D. 数据库系统由数据、数据库管理系统和数据库管理员组成答案:A5. 在面向对象编程中,封装的目的是:A. 提高代码的可读性B. 提高代码的可维护性C. 提高代码的可重用性D. 以上都是答案:D6. 在软件开发中,以下哪项不属于软件配置管理的范畴?A. 版本控制B. 变更管理C. 代码审查D. 软件测试答案:D7. 下列关于操作系统的描述,错误的是:A. 操作系统是计算机系统中最底层的软件B. 操作系统负责管理计算机硬件资源C. 操作系统提供了用户与计算机之间的接口D. 操作系统是应用程序答案:D8. 在软件工程中,模块化设计的主要目的是:A. 提高软件的运行速度B. 降低软件的复杂性C. 提高软件的可维护性D. 减少软件的存储空间答案:C9. 在软件开发过程中,以下哪项不是软件工程的基本原则?A. 模块化B. 逐步细化C. 重用性D. 无文档化答案:D10. 在面向对象编程中,继承的主要作用是:A. 提高代码的可读性B. 提高代码的可维护性C. 提高代码的可重用性D. 提高代码的执行效率答案:C二、多项选择题(每题2分,共10分)1. 下列关于软件质量的描述,正确的有:A. 软件质量可以通过测试来衡量B. 软件质量可以通过用户反馈来衡量C. 软件质量可以通过代码审查来衡量D. 软件质量可以通过文档的完整性来衡量答案:ABD2. 在软件开发过程中,以下哪些活动属于需求分析阶段?A. 确定软件的功能需求B. 编写软件的详细设计文档C. 编写软件的用户手册D. 确定软件的非功能需求答案:AD3. 在面向对象编程中,以下哪些概念属于基本特征?A. 封装B. 继承C. 多态D. 抽象答案:ABC4. 在数据库设计中,以下哪些操作属于规范化过程?A. 确定数据的存储方式B. 消除数据冗余C. 确定数据的关联关系D. 确定数据的完整性约束答案:BCD5. 在软件开发中,以下哪些因素会影响软件的可维护性?A. 代码的复杂度B. 代码的注释数量C. 代码的模块化程度D. 软件的文档完整性答案:ACD三、判断题(每题1分,共10分)1. 软件工程的目标是生产具有高质量软件的高效过程。
JAVA认证考试
目前Java 相关的认证有四个,分别是SCJP、SCWD、SCJD、SCAJ,考试时皆以英文出题,但在台湾SCJP 考试可以选择使用繁体中文版考题。
这几项认证考试的特点分述如下:SCJP(Sun Certified Java Programmer):测试Java 程序设计的观念和能力,内容偏重于Java 语法和JDK 内容。
共59 题复选及填充,时间 2 小时,答对61% 是及格标准。
SCWD(Sun Certified Web Component Developer for J2EE Platform):内容涵盖Servlet 与JSP。
考题为60 题复选及填充,时间 2 小时,答对70% 是及格标准。
SCJD(Sun Certified Java Developer):测试Java 软件开发的进阶技能,考试分成两阶段,第一阶段是程序设计题,时间无限制,答对80% 以上就可以进入第二阶段应试。
第二阶段是5-10 题简答题,时间90 分钟,答对70% 以上即可得到SCJD 认证。
SCAJ(Sun Certified Enterprise Architect for J2EE):测试对于J2EE 架构的熟悉程度以及系统整合的能力。
本考试分成三个阶段,第一个阶段是48 题复选题,时间75 分钟,答对68% 以上方可进入下阶段。
第二阶段是系统设计专题,无时间限制,答对70% 以上方可进入下一阶段。
第三阶段是四题申论题,应试时间90 分钟。
JAVA认证考试推荐教材:SL-275 “Java Programming(UNIX)”SL-276“Java Progrmming(Windows 95)”JTL-SL-275“Java Tutor:Java Programming Library”考试地点向Sun培训部购买准考证(Certification Voucher)Sun北京培训部 (010) 6803 5588 /6803 9059Sun上海培训部 (021) 6466 1228 /6326 7455Sun广州培训部 (020) 8755 5900 /8755 2813Sun 培训部收到您的汇款后,将向您提供准考证和相关考试中心联络信息。
Java程序员认证考试
Java程序员认证考试SUN认证SUN认证是给网络设计界建立的一套认证标准,Sun公司推出了Java以及Solaris技术认证方案。
对于企业而言,可以借助这项认证作为招聘人才的评判标准,或是作为衡量员工技术水准的'依据;在个人方面,通过这些认证也可以证明个人的技术能力。
1.Java认证考试该认证主要面对Java程序员。
同时,该认证是业界唯一经Sun授权的Java认证,考试内容涉及所有Java相关知识、编程概念及applet开发技巧。
Sun认证Java程序员考试旨在观察您通过应用软件分配进行复杂编程的能力,之后还要测试您完成编程所需的知识。
每次考试都包括65道以上的选择题,时间大约为90分钟。
目前在这方面有两项认证:SunCertified Java Programmer(SCJP)和 Sun Certified Java Developer(SCJD)。
SCJP测验Java程序设计概念及能力,内容偏重于Java语法及JDK的内容;SCJD则进一步测试用Java开发应用程序的能力,考试者必须先完成一个程序的设计方案,再回答与此方案相关的一些问题。
2. Solaris系统管理认证考试对Solaris/Sun OS系统管理员,Sun推出Certified Solaris Administrator(CSA)。
CSA分别为两个等级(Part Ⅰ和Part Ⅱ),测试对Solaris系统管理的了解程度。
3. Solaris网络管理认证考试为了测试使用者对于Solaris网络管理能力,Sun推出Certified Network Administrator(CNA)。
内容包括基本网络概念、Routing and Subnet、Security、Performance、DNS、NIS+等。
通过SUN任何一门专业认证后,考生将收到SunMicrosystems总公司寄发的资格证书及徽章,并有权将通过Sun认证的标记印在个人名片上,作为个人技术能力的肯定。
java工程师证书考试内容
java工程师证书考试内容Java是一种广泛应用于软件开发领域的高级编程语言,具有跨平台、面向对象、可移植等特点。
为了评估开发者的Java编程水平,许多机构和组织都提供了Java工程师证书考试。
本文将介绍Java工程师证书考试的内容,以帮助考生了解考试的目标和要求。
一、Java语法与基础知识Java语法与基础知识是Java工程师证书考试中的重要内容。
考试将涉及Java的各种语法要素和基本概念,包括变量和数据类型、运算符、流程控制语句、数组、面向对象编程、异常处理等。
考生需要掌握Java的语法规则,理解Java程序的执行流程,并能够运用基础知识解决问题。
二、Java核心类库Java核心类库是Java工程师证书考试的另一个重要内容。
考试将考察考生对Java核心类库的熟悉程度,包括IO流操作、集合框架、多线程、网络编程等。
考生需了解各类库的使用方法、常用类和接口,并能够正确地运用它们完成各种任务。
三、Java Web开发Java Web开发是现代软件开发的重要方向,因此Java工程师证书考试也会包含相关内容。
考试将涉及Java Web开发的基础知识和技术,包括Servlet、JSP、MVC架构、Web容器等。
考生需要熟悉Java Web开发的基本原理和常用工具,理解Web应用的开发流程,并能够开发简单的Web应用。
四、数据库与SQL数据库是大型软件系统中必不可少的组成部分,Java工程师证书考试也会考察考生对数据库和SQL语言的理解。
考试将要求考生熟悉关系数据库的基本概念,了解SQL语言的语法和常用操作,能够编写SQL查询语句和更新语句,并能够使用Java与数据库进行交互。
五、软件开发过程与项目管理软件开发过程和项目管理是Java工程师证书考试中的一项重要内容。
考试将考察考生对软件开发的各个阶段和常见模型的理解,包括需求分析、设计、编码、测试和维护等。
此外,考试还会关注软件项目管理的基本知识,包括项目计划、进度控制、团队协作等。
java工程师认证2023考卷
Java工程师认证2023考卷一、选择题(每题5分,共50分)A. JVMB. JDKC. JRED. GC2. 在Java中,下列哪个关键字可以用来定义接口?()A. interfaceB. classC. extendsD. implementsA. reverse()B. reverseOrder()C. reverseString()D. reverseOrderString()A. Date.now()B. Calendar.getInstance()C. LocalDate.now()D. LocalDateTime.now()A. constB. staticC. finalD. defineA. equals()B. ==A. ThreadB. RunnableC. ProcessD. ExecutorA. extendsB. implementsC. interfaceD. classA. abstractB. interfaceC. extendsD. classA. length()B. size()C. lengthD. getSize()二、填空题(每题5分,共25分)1. Java中的基本数据类型包括______、______、______、______、______、______、______和______。
2. 在Java中,______关键字用于定义一个类的成员变量或方法为静态的。
3. Java中的集合框架包括______、______、______、______等接口。
4. Java中的异常处理包括______和______两个关键字。
5. 在Java中,______类用于实现文件的读写操作。
三、简答题(每题10分,共30分)1. 请简要说明Java中的封装、继承和多态的概念。
2. 请简述Java中的垃圾收集器的作用及工作原理。
3. 请举例说明如何在Java中使用Lambda表达式。
-【优秀文档】Java认证模考试题及答案.doc
Java认证模考试题及答案Question: 1Given the following code:class Test{private int m;public static void fun() {// some code...}}How can the member variable m be accessible directly in the method fun()?A.change private int m to protected int mB・ change private int m to public int mC.change private int m to static int mD.change private int m to int mExplanation:If the variable m is changed to be a static variable it can be accessible in the method fun() for this method is a static member method. Correct Answer: C 1 of 60Question: 2Which methods are correct overloading methods of the following method: public void example(){..・}A.public void example( intB.public int cxamplc(){...}C.public void example2(){..JD.public int example (int m, float f){・•・}Explanation:The overloading methods must have the same names・ If only the return type of the methods are different it is sufficient tell the methods from each other. The arguments of the methods must be different enough to determine which method to call.Correct Answer: A,D 2 of 60Question: 3中国公务2004-5-27 22:14:08Given the following fragment of code: public class Base{int w, x, y ,z;public Base(int a.int b){ x=a; y=b;}public Base(int a, int b, int c, int d){ // assignment x=a, y=b w=d;Which expressions can be used at the point of// assignment x=a, y=b?A.Basc(a,b);B.x=a, y=b;C.x=a; y=b;D.this(a,b);Explanation:In the second constructor, the call this(a,b) passes control the version of the constructor that takes two int arguments.Correct Answer: C,D 3 of 60Question: 4Given the following definition:String s = story;Which of the following expressions are legal?A.s += books;B.chare = s[l];C.int len = s」ength;D・ String t = s.toLowerCase();Explanation:Answer B is not correct for String is a class and can'T be treated as an array of char. Answer C is not correct for s」cngth() should be used, not s」ength・Correct Answer: A,D 4 of 60Question: 5What is the return value of the main() method in Java?A.StringB.intC・ charD.voidExplanation:The main() method in Java returns void・Correct Answer: D 5 of 60Question: 6Which are the valid identifiers in Java?A.fieldnameB.superC・ 3numberD. #numberE・ SnumberExplanation:Valid identifiers in Java can start with a letter, underscore (_), or dollar sign ($), but not with digits or oth er signs• And identifiers can not be keywords.Correct Answer: A,E 6 of 60Question: 7Which are valid Java keywords?A.constB.NULLC.falseD.thisE.nativeExplanation:All the keywords in Java arc lowercase, goto and const arc keywords that arc not used in Java programming language.Correct Answer: A,C,D,E 7 of 60Question: 8 2005-8-16 3:14:42Which are valid integral expressions in Java?A.22B.0x22C.022D.22HExplanation:In Java integral has three forms: decimal, octal and hexadecimal. Octal values start with a zero and hexadecimal values start with Ox.Correct Answer: A,B,C 8 of 60Question: 9Which one of the following ranges of short is correct?Explanation:The length of the short data is 16 bits. The range of short isThe length of the short data is 16 bits. The range of short isCorrect Answer: D 9 of 60Question: 1()Which one of the following ranges of byte is correct?Correct Answer: B 10 of 60Question: 11 2004-5-27 22:14:08Given the following fragment of code, what arc results of i and j after execution?int i = 1;intj;j = i卄;A.1, 1B.1,2C.2, 1D.2,2Explanation:Pay attention to the position of the operator ++・ In this question, first j is assigned to 1, then the value of i is added to 2. Correct Answer: C 11 of 60Question: 12Which of the following statements are true?A.>> is the arithmetic right shift operator.B.» is the logical right shift operator.C.»> is the arithmetic right shift operator.D・ >>> is the logical right shift operator.Explanation:There are two right shift operators in Java. They are » and »>. » is the arithmetic(signed) right shift operator and »> is the logical(unsigncd) right shift opcrato匚Correct Answer: A,D 12 of 60Question: 13Which of the following assignments are legal?A.float a = 2.0B.double b = 2.0C.int c = 2D.long d = 2Explanation:In Java the default data type of floating point is double, not float. The assignment from double to float requires an explicit cast. Correct Answer: B,C,D 13 of 60Question: 14Which one of the following arguments is the correct argument of the main() method?A.char args[]B.char args[][]C・ String arg [JD.String argsExplanation:The argument of the main() method is an array of String. Then only answer C is an array of String・Correct Answer: C 14 of 60Question: 15Which one of the following is correct to create an array?A.float f[][] = new float[6][6J;B.float [Jf[J = new float[6][6];C.float ff][] = newD.float [][]f = new float[6][6];E.float [][]f = new float[6][];Explanation:In Java the declaration format allows the square brackets to be at the left or right of the variable name・ But the new float[][6] is illegal.Correct Answer: A,BQ,E 15 of 60Question: 16Given the following expression: int mLJ 二{0, 1,2, 3, 4, 5, 6 };Which result of the following expressions equals to the number of the array elements?A.m」cngth()B.m」engthC.m.length()+lD.m」ength+1Explanation:The number of elements in an array is stored in the length attribute in the array object.Correct Answer: B 16 of 60Question: 17Given the following command to run a correct class: java MyTcst a b cWhich statements are true?A.args[0] = MyTest a b cB.argsfO] = MyTestC.args[0] = aD.args[l]= VExplanation:The three arguments a b c are stored in the args fl array of the main() method. Then args[()]= a, args[ll= b, args[2]= c. Correct Answer: C 17 of 60Question: 18Given the following code:public class Test{long a[] = new long[10];public static void main ( String arg[]) {System.out.println (a[6_|);}}Which statement is true?A.Output is null.B.Output is 0.C.When compile, some error will occu匚D.When running, some error will occu匚Explanation:When an aiTay is created the members of the array is initialized・ In this case all the elements are initialized to be 0. Correct Answer: B 18 of 60ucstion: 19Given the following fragment of code:boolean m = true;if ( m = false )System.out.println(False);elseSystcm.out.println(Truc);What is the result of the execution?A.FalseB.TrueC.NoneD.An error will occur when running・Explanation:=is the assignment operato匚==is the compare operator. In this question the value of false is assigned to the variable m.Correct Answer: A 19 of 60Question: 20Given the following code:public class Test{public static void main(String arg[]){int i = 5;do {System.out.println(i);} while (-i>5)System.out.println( "finished");}}What will be output after execution?A.5B.4C.6D.FinishedE.NoneExplanation:The expressions in the block of do/while loop will be executed at least once• If the condition of this loop is not met the loop will stop after once execution, otherwise, it will continue to loop until the condition is no met.Correct Answer: AQ 20 of 60Question: 21What will be output after execution of the following code:outer: for(int i=0;iv3; i++)inner: for(int j=0;j<2;j++)if(j==l) continue outer;System.out.println(j+ ?and ?+i);A.0 and 0B.0 and 1C.0 and 2D.1 and 0E.1 and 1F. 1 and 2G.2 and 0H.2 and 1I. 2 and 2Explanation:The continue statement is used to skip over and jump to the end of the loop body. Then if j equals to 1 it will jump to the end of the inner loop body.Correct Answer: A,B,C 21 of 60Question: 22Given the following code:switch (m){case 0: System.out.println(Condition 0);case 1: System.out.println(Condition 1);case 2: System.out.println(Condition 2);case 3: System.out.println(Condition 3);brcak;default: System-out.println(Other Condition);}Which values of m will cause Condition 2 is output?A.OB.1C.2D.3E.4F.NoneExplanation:In the block of switch, if there is no break sentence in one case the following sentences will be executed.Correct Answer: A,B,C 22 of 60Question: 23Which method is called when the browser returns to the page containing the applet after moving to another URL?B.start()C.stop()D.destroyOExplanation:The start() runs whenever the applet becomes visible, such as when the browser returns to the page containing the applet after moving to another URL or the browser is restored after being iconizecLCorrect Answer: B 23 of 60Question: 24If a thread calls the wait() method, which methods can make it continue to run?A.join()B.resume()C.notifyOD.notifyAll()E.high priority thread is readyExplanation:If a thread issues a wait() call it will pause execution until another thread issues a notifyO or notifyAll() call. The pair of the methods are provided for thread communication.Correct Answer: C,D 24 of 60Question: 25Which method is used to define the execution body of a thread?A.start()B.init()C.run()D.main()E・ synchronized()Explanation:The threads will always begin executing at the run() method, which contains the definition of the execution body.Correct Answer: C 25 of 60Question: 26Which keyword is used to allow interaction with the lock flag?A.nativeB.staticC.synchronizedD.abstractExplanation:Every object has a lock Hag. The synchronized keyword enables interaction with the flag, which allow exclusive access to that object ・Correct Answer: C 26 of 60Question: 27Which modifiers are legal in Java?A.privateB.publicC.protectedD.protectE.friendExplanation:The public, private, protected and no modifier are legal modifiers. The friend and protect are illegal in Java・Correct Answer: A,B,C 27 of 60Question: 28If a member variable of a class can be accessible only by the same package, which modifier should be used?A.privateB・ publicC・ protectedD.no modifierE.finalExplanation:No modifier is the default access level. The default modifier means to be accessible by the classes in the same package. Correct Answer: D 28 of 60Question: 29Which modifier should be used to define a constant member variable?A.staticB.finalC.abstractD.No modifier can be usedExplanation:If a member variable is marked as final, it is a constant.Correct Answer: B 29 of 60Question: 30Which one of the following is correct to declare a native method?A.public native void test();B・ public native void test(){}C.public void native test();D.public native tcst(){}Explanation:A native method can not have a method body. And the keyword native can't be put in front of the return value of the method・Correct Answer: A 30 of 60Question: 31Given the following definition of a class:public class Test {private float f = 1.0;int m = 12;static int n=l;public static void main(String arg[J) {Test t = new Test();// some code..・}}Which of the following usage are legal?A.t.fB.this.nC.Test.mD.Test.nExplanation:The f and m arc instance variables・ They should be accessed through an object. The n is a class variable and it should be accessed through the class name.Correct Answer: A,D 31 of 60Question: 32Given the following code:1)class Example {2)String str;3)public Example(){4)str= example;5)}6)public Example(String s){7)str=s;8)}9)}10)class Demo extends Example {11)}12)public class Test{13)public void f () {14)Example ex = new Example(Good);15)Demo d = new Dcmo(Good);⑹}Which line will cause an error?A.line 3B.line 6C.line 1()D.line 14E.line 15Explanation:The Demo class doesn't have a constructor that takes one String argument. The call on line 15 will cause an eno匚Correct Answer: E 32 of 60Question: 33Given the following class definition in one source file:class Base {public Base (){ //... }public Base (int m ){ 〃…}protected void fun( int n ){ 〃…}}public class Child extends Base{// member methods}Which methods can be added into the Child class correctly?A.private void fun( int n ){ II...}B.void fun (int n ){ //...}C.protected void fun (int n ) { 〃…}D.public void fun (int n ) { II...]E.public m(){ II... }Explanation:In the subclass Child the overriding methods cannot be less accessible than the method they overrides in the super class Base. Correct Answer: CQ 33 of 60Question: 34Which statements are correct?A.In Java single inheritance is allowed, which makes code more reliable.B・ A subclass inherits all methods (including the constructor ) from the superclass・C・ A class can implement as many interfaces as needed・D. When a class implements an interface, it can define as many methods of the interface as needed. Explanation:A subclass inherits all methods except the constructor from the superclass・ When a class implements an interface, it can define all the methods of the interface.Correct Answer: A,C 34 of 60Question: 35In the Tcst.java source file, which arc correct class definitions?A.public class test {public int x = 0;public test(int x){this.x = x;}}B.public class Test{public int x=0;public Test(int x) {this.x = x;}}C.public class Test extends Tl, T2 {public int x = 0;public Test (int x) {this.x = x;}}D.public class Test extends T1 {public int x=0;public Test(int x){this.x = x;}}E.protected class Test extends T2{public int x=();public Test(int x){this.x=x;}}Explanation:In the Test.java source file the class name should be Test, not test, for it is case-sensitive in Java. One class should have not more than one superclass. The protected modifier can not be put in front of the class・Correct Answer: B,D 35 of 60Question: 36The Person, Student and Teacher are class names・ These classes have the following inheritance relation as shown below: PersonIIStudent TeacherThere is the following expression in a Java source file:Person p = new Student();Which one of the following statements arc true?A.The expression is legal.B・ The expression is illegal.C.Some errors will occur when compile・pile is correct but it will be wrong when running・Explanation:The objects cast up the class hierarchy are always permitted. A reference of superclass can refer to an object of subclass.Correct Answer: A 36 of 60Question: 37The Person, Student and Teacher are class names・ These classes have the following inheritance relation as shown below: PersonIIStudent TeacherIn Java source file a specific method has an argument. In order to handle all these classes in this method which type of argument of this method should be used?A.PersonB.StudentC.TeacherD.ObjectE.None of them can be used.Explanation:The objects of subclasses can pass around using references to their parent classes. The Person and Object arc superclasses of the Teacher and Student classes・ The type of the argument of the method should be Person or Object・Correct Answer: A,D 37 of 60Question: 38The Person, Student and Teacher arc class names・ These classes have the following inheritance relation as shown below: PersonStudent TeacherPerson p = new Tcachcr();Which of the following expressions return true?A.p instanceof TeacherB.p instanceof StudentC.p instanceof PersonD.None of them returns trueExplanation:The instanceof operator is used to test the type of an object. Because the reference p refers to a Teacher object and the Teacher is a subclass of the Person class the expressions in answer A and C will return true.Correct Answer: A,C 38 of 60Question: 39Given the following code:public class Tcst{public static void main(String args[]){String str=new String(World);char ch[]={,H,,,e,,,r,T;o,};changc(str,ch);System.out.println(str + and + ch);}public static void change(String str, char ch[J){str=Changcd; ch[0]=,C';}}What is the result after execution?A.World and HelloB.World and CelloC.Changed and HelloD.Changed and CelloExplanation:Java passes arguments only by value・ When an object instance is passed as an argument to a method, the value of the argument is a reference to the objec匚The contents of the object can be changed in the called method, but the object reference is never changed ・Correct Answer: B 39 of 60Question: 40Given the following fragment of code:Double dl = new Double( 1.0);Double d2 = new Double(l .0);Float f = new Float(l.OF);A.dl == d2B.dl.equals(d2)C.dl =fD.f.equals(dl) Explanation:The == operator determine if reference values refer to the dame object. The equals() method is overridden in the Double, Float, String etc・ class to compare the content of the objects・Correct Answer: B 40 of 60Question: 41Given the following code: public void fun (){int i;try{i=System.in.read ();System.out.println(Location 1);} catch (IOExccption c) {System.out.println(Location 2);} finally {System.out.println(Location 3);}System.out.println(Location 4);}If an lOException occurs, what will be printed?A.Location 1B.Location 2C.Location 3D.Location 4Explanation:When an IOExccption occurs the Location 1 is skipped・ Fist the exception is caught and the Location 2 is printed・ Then the Location 3 in the block of finally is printed. Finally, the Location 4 is printed.Correct Answer: B,C,D41 of 60Question: 42If the method func() is allowed to throw out the lOException, which declaration of this method can used?A.public int func(int i)B.public int func(int i) throw IOExccptionC.public int func(int i) throw ExceptionD.public int func(int i) throws IOExccptionE.public int func(int i) throws ExceptionExplanation:The throws keyword should be used when declaration of a method. In the declaration IOExccption and its superclass Exception can be used.Correct Answer: D,E 42 of 60Question: 43Given the following expression:String f = null;Which of the following expressions will throw an exception?A.f == null I f.length()>10B.f != null I f.length()>10C.f == null II f.lcngth()>10D.f != null II f.length()>10Explanation:The operator II perform short-circuit logical expressions. If the first subexpression is true the second subexpression is skipped, for the entire expression is true when the first subexpression is true. The operator I doesn't perform short-circuit logical expressions. Both of the two subexpressions are performed. Because the f is null the expression f」ength() will cause an exception is thrown・Correct Answer: A,B,D 43 of 60Question: 44Which of the following can be parts of the Java source file Calculation 1 java?A.public class Calculation! {//...}B・ import java.io.*;C.package myPackage;D.import java.awt.*;E.s tatic class Arg{//••・}F.class Calcu{//...}G.public class Calculation2{//..・}Explanation:The static can not be a modifier before the keyword class・ A Java source file can have only one public class.Correct Answer: A,B,C,D,F 44 of 60Question: 45Which one of the following containers must be added to another container?A.WindowB.FrameC.DialogD.PanelExplanation:The Window, Frame and Dialog are free-standing windows. But the Panel is contained within another container, or inside a Web browser's window・Correct Answer: D 45 of 60Question: 46Which of the following classes are layout managers in Java?A.CardLayoutB.BorderLayoutC・ PanelLayoutD.GridLayoutE.BagLayoutExplanation:There are five layout managers in Java・They are FlowLayout, BorderLayout, CardLayout, GridLayout and GridBaglayout. Correct Answer: A,B,D 46 of 60Question: 47A Button is positioned in a Frame. Only height of the Button is affected by the Frame while the width is not. Which layout manager should be used?A.FlowLayoutB.CardLayoutC・ North and South of BorderLayoutD.East and West of BorderLayoutE.GridLayoutExplanation:In the East and West of BorderLayout only the height of the component is affected when the Frame is resized・Correct Answer: D 47 of 60Question: 48A Button is positioned in a Frame. Its size is not affected when the Frame is resized. Which layout manager should be used?A.FlowLayoutB.CardLayoutC.North and South of BorderLayoutD.East and West of BorderLayoutE・ GridLayoutExplanation:The size of the components is not constrained by the FlowLayout manage匚When the area is resized the size of these components is not changed.Correct Answer: A 48 of 60Question: 49Which methods can get the event source in the WindowEvent?A.getFrame()B.getlD()C・ getSource()D. getWindow()Explanation:The methods getSource() and getWindow() can be used to get the event sources of the window events・Correct Answer: CQ 49 of 60Question: 5()Which statements of the event listener are true?A.Multiple listeners can be attached to one component.B.Only one listener can be attached to one component.C.One listener can receive and process the events from multiple components・D・ One listener can receive and process the events from only one component.Explanation:One component can registers one or more listeners・ One listener can be registered by multiple components・ After being registered the listener can receive and process the events from these components.Correct Answer: A,C 50 of 60Question: 51What is the return value of the method in the event listener interface?A.intB.StringC.voidD.ObjectE.AWTEvcntExplanation:All the methods in the event listener interfaces return void.Correct Answer: C 51 of 60Question: 52Which of the following event listeners have event adapters defined in Java?A.MouseListenerB.KeyListenerC.ActionListcncrD.ItemListenerE.WindowListcncrExplanation:Four listeners don't have their corresponding event adapters・ They are ActionListener, ItemListener, AdjustmentListener and TextListene 匚Correct Answer: A,B,E 52 of 60Question: 53Which one of the following methods is not related to the display of the applets?A.updatc()B.draw()C.repaint()D.paint()Explanation:The paint(), update() and repaint() are predefined methods in Java・ They are related to the display of the applets.Correct Answer: B 53 of 60Question: 54Given the following definition:TextArea ta = new TextArea (Hello, 5, 5);Which statements are true?A. The maximum number of chanicters in a line is 5.B・ The displayed height is 5 lines otherwise constrain.C・ The displayed string can use multiple fonts.D.The displayed strings are editable.Explanation:The TextArea is constructed to a 5 row * 5 character text area・ It cannot display multiple fonts・ The strings are editable by default. The displayed width of a line is 5 characters, but the maximum number in a line is more than 5.Correct Answer: BQ 54 of 60Question: 55Which method can be used to add MenuBar to a Frame?A.setMenu()B.setMenuBar()C.add()D.addMenuBar()Explanation:McnuBar is added to a Frame by using the sctMcnuBar() method. The add() method is used to add components to containers. Correct Answer: B 55 of 60Question: 56Which are not containers in Java?A. ScrollPaneB・ CanvasC.ScrollbarD.AppletE.DialogExplanation:Scrollbar and Canvas are not containers・ The following classes are containers in Java: Panel, Window, ScrollPane, Dialog, Frame, Applet.Correct Answer: B.C 56 of 60Question: 57Which of the following method can be used to define a new thread class?A. implement the Runnable interfaceB・ add a run() method in the classC.create an instance of ThreadD.extend the Thread classExplanation:Two methods can define a new thread class: to implement the Runnable interface or to extend the Thread class・Correct Answer: AQ 57 of 60Question: 58Which of the following I/O stream are node streams?A. FilelnputStreamB・ BufferedlnputStreamC・ PushbacklnputStreamD. ByteArraylnputStreamExplanation:The FilelnputStream and ByteArraylnputStream are node streams・ The BufferedlnputStream and PushbacklnputStream are filter streams.Correct Answer: A,D 58 of 60Qucstion:59Which of the following classes can handle the Unicode?InputStrcamRcadcrBufferedReaderWriterPipedlnputStreamExplanation:Java uses Unicode to represent strings and characters and Java provides 16 bit versions of streams to allow characters to be treated similarly. They are Reader, Writer and their subclasses・Correct Answer: A,B,C 59 of 60Question: 60Which classes are used to implement TCP/IP client and servers?A.ServerSocketB.ServerC.SocketD.DatagramPacketE.DatagramSocketExplanation:Use ServerSocket and Socket classes to implement the TCP/IP clients and servers. The DatagramPacket and DatagramSocket are used in the UDP-based network communication.Correct Answer: A,C 60 of 60。
java程序员的认证SCJP考试
java程序员的认证SCJP考试关于java程序员的认证SCJP考试Java能够自动处理对象的引用和间接引用,实现自动的无用单元收集,使用户不必为存储管理问题烦恼,能更多的时间和精力花在研发上。
下面是关于java程序员的认证SCJP考试,欢迎大家参考!课程:SL-275 JAVA语言编程本课程使学员掌握如何使用标准JAVA Development Kit,V1.1 (JDK) 开发应用程序和applets。
在本课程中您将学会JAVA 语言的语法。
如何使用JAVA 来创建图形用户接口 (GUI), 事件处理机制, 例外处理, 通过设计与开发各种JAVA 程序来获得实际的编程经验. 您也将学到文件输入/输出(I/O)、多线程和网络的知识.。
本课程适用于熟悉C或C++的编程人员, 也适用于想参加Sun JAVA 认证考试的学员。
预备知识:学习本课程之前必须具备以下能力能够编译C 或C++ 程序或者已经参加过SL-110课程;能够创建和编译简单的程序;使用 WWW(World wide web) 浏览器, 如: Netscape;能够使用vi或者OpenWindows的文件编辑器;使用基本UNIX的命令。
课程学习完成后,将具备以下能力:使用JAVA 编程语言创建JAVA 应用程序和applets定义和描述垃圾搜集, 安全性和JAVA 虚拟机(JVM)描述和使用 JAVA 语言面向对象的特点开发图形用户接口 (GUI),利用JAVA支持的多种布局管理描述和使用JAVA 1.1 的事件处理模式使用JAVA 语言的鼠标输入, 文本, 窗口和菜单窗使用JAVA的例外处理来控制程序执行和定义用户自己的例外事件使用JAVA 语言的先进的面向对象特点, 包括方法重载, 方法覆盖, 抽象类, 接口等等实现文件的输入/输出(I/O) 使用JAVA 语言内在的线程模式来控制多线程使用JAVA的Sockets 机制进行网络通信参加Java程序员认证考试 java程序员认证考试考试号为310-025。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
工业和信息化产业部中级JAVA软件工程师考试学校:____________ 学号:____________ 姓名:______________注意:考试时间为120分钟,试卷总分100分,闭卷考试,请遵守考场纪律,考试严禁作弊,作弊者立即停止考试,成绩按0分处理。
到时间收卷,延迟交卷按作弊处理。
多项选择会在题目后提示多选,没有提示说明默认是单选,并将选择题答案填入最后的答题卡中。
一、选择题 (共20题,每题2分, 共40分)1)以下代码编译报错的是 DA. double a = 129; a = 129;C. short a = 129; a = 129;2)以下是JAVA基本数据类型的是(多选)ACA. intB. StringC. doubleD. Boolean 基本数据类型short,boolean,开头大写为引用数据类型。
除Integer为int的改写3)下面不是JAVA关键字的是BCA. breakB. stringC. retrunD. throw return4)以下哪个异常类型描述的是引用未初始化 AA. NullPointerExceptionB. ClassCastException 类型转换异常C. NumberFormatException 数据不匹配D. IndexOutOfBoundsException 下标越界5)执行下面程序,输出的结果是B1,public class Test{2, public static void main(String[] args){3, int a = 5;4, double b = 8;5, a = a++ + b; int型不够装入double型6, }8, }A.第4行编译报错B.第5行编译报错C.编译成功,输出13D.编译成功,输出146)在 Java API 文档中哪些节是包含在class 文档内的(多选)ABCA、class的描述以及相关内容B、成员变量列表C、类的层次结构图D、父类的方法列表7)关于被保护访问控制符protected修饰的成员变量,以下说法错误的是BA、能被同一包内的类访问,也能被同一包内的子类访问B、只可以被两种类访问和引用:该类本身、该类的所有子类C、可以被三种类所引用:该类本身、与它在同一个包中的其他类、在所有继承该类的子类D、能被同一包内的类访问,也能被其它包内的子类访问编译报错B. LiLeihelloC. LiLeihelloD. 无任何输出8)下面程序的输出结果是 Apublic class Test{public static void main(String[] args){String s = “abc dsf ghi”;String[] arr = (“\s”);输出171C. 第2行和第5行编译报错D. 第10行编译报错9)执行以下代码后,下面哪些描述是正确的 C1 public class Student{2 private String name = “Jema”;3 public void setName(String name){4 = name;5 }6 public String getName(){7 return ;8 }9 public static void main(String[] args){10 Student s;11 }13 }A.输出nullB.第10行编译报错C.第11行编译报错D. 输出Jema10)J AVA面向对象的特征有(多选)ACDA. 封装;B. 类;C. 继承;D. 多态;11)以下是JAVA中正确的入口方法是 AA. public static void main(String[] args){}B. public static void main(String args){}C. public void main(String[] args){}D. public static int main(String[] args){}12)关于JAVA赋值,下面哪些值的说明是正确的(多选) ABCA. '\n'是表示char类型的换行字符; B. 010是表示8进制的int类型值;C. 表示float类型的值;D. 20L是表示int类型的值;xB. x=xC. “x=”+5D. 编译报错执行以下代码,输出结果的结果是 CnullB. -1C. 编译时出错D. 运行时报错13)如下代码:public void Test() {try {oneMethod();"condition 1");} catch (ArrayIndexOutOfBoundsException e) {"condition 2");} catch(Exception e) {"condition 3");} finally {"finally");}}如果oneMethod正常运行,则输出结果中是AA. condition 1 finallyB. condition 2 finallyC. condition 3 finallyD. finally String s = "Gone with the wind";String t = " good ";String k = s + t;B. String s = "Gone with the wind";String t;t = s[3] + "one";C. String s = "Gone with the wind";String standard = (); 变大写D. String s = "home directory";String t = s - "directory";二、简答题(共5题,每题5分,共25分)1)请简述final和finally的区别,并说明各自的用途。
finally 用于异常捕捉,无论是否会报异常,finally语句块都会执行。
final修饰变量,该变量就成常量,值不可以改变。
修饰方法,该方法不能被重写,但能被重载。
修饰类,该类不能被继承。
2)请描述什么是方法的重写、什么是方法的重载。
重写:重载:3)String如何与字节数组相互转换请写出相应的方法。
个类只能继承一个抽象类,一个类可以实现多个接口2.接口中不能含有静态代码块和静态方法,而抽象类可以3.抽象类可以提供成员方法的实现细节,而接口中只能存在抽象方法4.抽象类中的成员变量可以是各种类型,而接口中的成员变量只能是public static final类型三、编程题(共2题,共35分)1)现有一个数组fromNums,数组的值为{76,23,98,65,21},要求实现将该数组中的值复制到另一个数组toNums中。
(15分)提示:使用();/*** 1)现有一个数组fromNums,数组的值为{76,23,98,65,21},* 要求实现将该数组中的值复制到另一个数组toNums中。
(15分)* @author Administrator**/public class Test7 {public static void main(String[] args) {int[] fromNums = {76,23,98,65,21};int[] toNums = new int[];ubstring(0, 1).toUpperCase()+array[i].substring(1);}/*for(String a : array){}*/ubstring(0,1).toUpperCase()).append(array[i].substring(1)).append(" ");}()-1));}}补充/*** 定义一个数组,在中间位置添加一个数* @author Administrator**/public class Test9 {public static void main(String[] args) { int[] array = {34,5,112,55,783,23,899};int[] newArray = new int[+1];//前半部分for(int i = 0; i< 2;i++){newArray[i] = array[i];}//中间部分newArray[2] = 119;//后半部分for(int i = 2;i< ;i++){newArray[i+1] = array[i];}for(int a : newArray){}}}。