CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Java >  J2SE / 基础类

读文件的两个小题?

楼主xzl1882(黑|白)2005-04-03 13:50:26 在 Java / J2SE / 基础类 提问

33.(      )  
  The   file   "file.txt"   exists   on   the   file   system   and   contains   ASCII   text.    
    try{    
        File   f=new   File("file.txt");    
        OutputStream   out=new   FileOutputStream(f);    
        }catch   (IOException   e){}    
    A.   the   code   does   not   compile    
    B.   the   code   runs   and   no   change   is   made   to   the   file    
    C.   the   code   runs   and   sets   the   length   of   the   file   to   0   。  
    D.   An   exception   is   thrown   because   the   file   is   not   closed    
    E.   the   code   runs   and   deletes   the   file   from   the   file   system    
   
  34.(      )  
  The   file   “file.txt”   exists   on   the   file   system   and   contains   ASCII   text.    
  Given:  
  38.   try   {  
  39.   File   f   =   new   File(“file.txt”);  
  40.   OutputStream   out   =   new   FileOutputStream(f,   true);  
  41.   }  
  42.   catch   (IOException)       {}  
  What   is   the   result?  
  A. The   code   does   not   compile。  
  B. The   code   runs   and   no   change   is   made   to   the   file.    
  C. The   code   runs   and   sets   the   length   of   the   file   to   0.    
  D. An   exception   is   thrown   because   the   file   is   not   closed.      
  E. The   code   runs   and   deletes   the   file   from   the   file   system.    
  请帮忙详细解释两道题都是考什么方面的知识的。为什么。  
  问题点数:0、回复次数:1Top

1 楼kingfish(工作很忙,很少来csdn...)回复于 2005-04-03 16:03:58 得分 0

C  
  B  
   
  构造函数的区别Top

相关问题

  • 读文件的小问题
  • 读文件问题
  • 读文件问题!
  • 读文件问题?
  • 一个文件读写的小问题
  • 读取文件内容的小问题
  • 读文件的2个小问题
  • 文件读写的小问题
  • 读写文件的小问题
  • 写文件和读文件的问题?

关键词

  • code
  • code runs
  • txt

得分解答快速导航

  • 帖主:xzl1882

相关链接

  • CSDN Java频道
  • Java类图书
  • Java类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo