sorry,let's continue:class a{
public static void main(String[] args){
int a;
a=a+1;
}
}
question:what will happen when compile this code?
.
.
.
D does not compile
E complile but throw a compile time errorthe answer is E.can sb tell me what the difference between choise D and E
public static void main(String[] args){
int a;
a=a+1;
}
}
question:what will happen when compile this code?
.
.
.
D does not compile
E complile but throw a compile time errorthe answer is E.can sb tell me what the difference between choise D and E
解决方案 »
- 把数据转成二进制数据
- 求高手把下面C语言改为JAVA的
- ArrayList<接口> 如何类型转换成ArrayList<实现>
- 用eclipse打包后在生成exe文件显示无主方法,这可怎么办??
- 关于JDBC的代码里的问题 大大们帮我解释下代码
- fileoutputStream.write() 是不是每次输出后都将原来文件的内容冲掉?
- JPanel 如何改背景颜色
- 请教一个socket 程序问题?
- 高手请指点
- 真的很急不知道该怎么办?HotSpot Virtual Machine Error!!!
- 求救:我在 JAVA 中用 TextField 输入文字时发现,在汉字方式下敲不了标点符号,而我用 VC 的 EDIT 却可以,为什么?
- 看看这道题!
the answer may be D.
It does not compile.
and the prompt is as following:
-----------
C:\src>javac testCompile.java
testCompile.java:4: 变量 a 可能还未被初始化
a=a+1;
^
1 个错误C:\src>
------------