【Java开源代码栏目提醒】:本文主要为网学会员提供errorCompoundVariable.java,希望对需要errorCompoundVariable.java网友有所帮助,学习一下!
public class errorCompoundVariable{
public static void main(String args[]){
int methodVariable=10;
{ int compoundVariable=20;
System.out.println("methodVariable="+methodVariable); //正确
System.out.println("compoundVariable="+compoundVariable); //正确
}
System.out.println("methodVariable="+methodVariable); //正确
// System.out.println("compoundVariable="+compoundVariable); //错误
}
}
上一篇:
ErrorCellRenderer.java
下一篇:
用遗传算法解决车辆优化调度问题