类名 FinalTest
类代码
public class FinalTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
FinalTest finalTest = new FinalTest();
finalTest.method(100);
finalTest.method(200);
}
public void method(final int i) {
System.out.println("i=" + i);
}
}
运行结果
i=100
i=200