《java面试笔试题(English)》.pdf

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
《java面试笔试题(English)》.pdf

Exam : 310-055 Title : Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 Ver : 01-07-08 310-055 QUESTION 1: Given the code in the exhibit. What is the result? A. Compilation fails B. An exception is thrown at runtime. C. An instance of Forest is serialized. D. An instance of Forest and an instance of Tree are both serialized. Answer: B Explanation: The following code can be tested: import java.io.*; public class Forest implements Serializable{ private Tree tree=new Tree(); public static void main(String[] args){ Forest f=new Forest(); try{ FileOutputStream fs=new FileOutputStream(Forest.ser); ObjectOutputStream os=new ObjectOutputStream(fs); os.writeObject(f); os.close(); }catch(Exception exp){exp.printStackTrace();} }} class Tree{} QUESTION 2: A - The Power of Knowing 310-055 Which code, inserted ay line 14, will allow this class to correctly serialized and desterilize? A. S. default ReadObject ( ); B. This = s.defaultReadObject ( ); C. Y = s. default ( ) ; x = s.readInt ( ); D. X = s. readInt; y = s. readInt ( ); Answer: D QUESTION 3: Given the exhibit. What is the result? A. 0 B. 1 C. 4 D. Compilation fails E. An exception is thrown at runtime Answer: D A - The Power of Knowing 310-055 QUESTION 4: Given the exhibit: The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14,2000? A. The value of S is 14 - dic-2004 B. The value of S is Dec 14, 2000 C. An exception is thrown at runtime D. Compilation fails because of an error in line 13. Answer: D QUESTION 5: DRAG DROP The doesFileExist method takes an array of directo

文档评论(0)

wyth + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档