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
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
解决方案 »
- com.microsoft.sqlserver.jdbc.SQLServerDriver找不到
- 又一个奇怪的问题,
- 如何将日期类型Date 2008-04-14 12:03:45,转换成日期类型 Date 2008??
- 如何对 file 类型的表单组件进行初始值设置
- 怎样生成可直接运行的jar文件?
- 网页内嵌applet中弹出新窗口时的焦点问题!!
- 我想下载j2sdk...听说才1M,,我找到的为什么是42M或更大?
- 求《java编程思想》第二版的光盘
- 一个菜鸟的大问题,急!!!-解决就给分!!!
- 对于 session 绑定事件的使用
- 请问怎样用java做出液体效果出来啊.比如按钮看起来象液体那样很漂亮的
- 急求《UML和模式应用:面向对象分析与设计导论》中文版
后一题更加基础,找本书看看吧。
第三题的答案是:A,B,但我不明白C为什么不可以?
----------------《Thinking in JAVA》3rd p.202
但是建议使用int[] a, XXX[] x,原因是在java中数组其实是一种特殊的对象,int[], XXX[] 其实就是它的类型,这个和c有明显差别
所以使用 <类型名> <变量名>的方式来声明变量是正确的,而int[n]的类型根本不存在(数组的下标其实是这个对象的一个字段,就好象a.length,真实因为c数组没有这个.length,所以在传递数组的时候,要连带告诉人家,这个数组的长度)
int[] a = new int[10];//声明
int[] a;
//定义
a = new int[10];