public class Test2{
public int aMethod(){
static int i=0;
i ++;
return i;
}
public static void main(String args[]){
Test2 test = new Test2();
test.aMethod();
int j = test.aMethod();
System.out.println(j);
}
}
public int aMethod(){
static int i=0;
i ++;
return i;
}
public static void main(String args[]){
Test2 test = new Test2();
test.aMethod();
int j = test.aMethod();
System.out.println(j);
}
}
解决方案 »
- 对于Java中编码解码的一点理解,各位看对吗?要不然该是怎样?
- java调用VC的dll,字符串转换
- 使用反射,如何获得数组对象的元素类类型
- 关于浏览器表单登录后,SESSION无法共享的问题?
- String能不能直接转换成byte(不是byte[])?请高手指点
- Eclipse的plug-in
- URI scheme is not "file",为什么啊
- 关于AJAX的小问题
- 使所有实现此接口(interface)的类拥有相同的构造器(contructor)?
- 面向对象中的一些问题
- 通过socket连接到ftp服务器上,如果ftp有密码,如何获取连接并能执行相应的命令?
- log4j可否支持这样的需求:DEBUG的打印到日志上,ERROR的写日志文件 这样可以实现吗?
`这句话不对,局部变量只能使用final`作为修饰子。