1. C
default is overwrite the output file
2. A
catch (IOException)   {}
should be catch (IOException e)   {}
if this is a typo, then B
the second parameter's name is append, if true, will append to the end of the original file
3. C
pick up a book and see why

解决方案 »

  1.   

    前两题自己编点代码,测试一下不就知道了。然后查一下API文档(JBUILDER里面就有)。这种问题都问对自己的长进没什么好处,还是多写点程序多自己动手好。
    后一题更加基础,找本书看看吧。
      

  2.   

    不好意思,我是在做SCJP的练习,有部分不知道为什么,想各位请教。
    第三题的答案是:A,B,但我不明白C为什么不可以?
      

  3.   

    The complier doesn't allow you to tell it how big the arrary is.
    ----------------《Thinking in JAVA》3rd p.202
      

  4.   

    NO. 3 i don't know eitherwhat do you mean by "the compiler doesn't allow u"?
      

  5.   

    int[] a 和 int a[] 都是正确的声明
    但是建议使用int[] a, XXX[] x,原因是在java中数组其实是一种特殊的对象,int[], XXX[] 其实就是它的类型,这个和c有明显差别
    所以使用   <类型名> <变量名>的方式来声明变量是正确的,而int[n]的类型根本不存在(数组的下标其实是这个对象的一个字段,就好象a.length,真实因为c数组没有这个.length,所以在传递数组的时候,要连带告诉人家,这个数组的长度)
      

  6.   

    另外请注意声明和定义的区别//声明  连同 定义
    int[] a = new int[10];//声明
    int[] a;
    //定义
    a = new int[10];