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);
}
}
解决方案 »
- [求助]去掉了标题栏后仍然能够拖动窗口
- Exception in Thread "main " java.lang.NullPointerException 运行出错哪位大神帮忙解决下
- java 光标
- 谁能给我个SWT图形界面开发的例子?多谢!!
- 求助:关于JComboBox
- 如何得到树节点的值
- 如何使java类中一方法在Deprecated,使得在jbuilder等开发工具中知道此方法已过时了?
- 请教一个java.io的问题
- 我的VM是不是坏了,我写的一个简单的java程序运行居然报错Exception in thread "main" java.lang.NoClassDefFoundError: WelcomeApp
- ???????怪了???/
- 通过socket连接到ftp服务器上,如果ftp有密码,如何获取连接并能执行相应的命令?
- log4j可否支持这样的需求:DEBUG的打印到日志上,ERROR的写日志文件 这样可以实现吗?
`这句话不对,局部变量只能使用final`作为修饰子。