Hello people,
I created an innter class like this
public class OuterClass{
int attribute=0;
class InnerClass {
public void method1(){
attribute++;
}
public void method2(){
System.out.println(attribute);
}
}
My problem is when I call method2() in a correct way, it displays 0 and not 1 as I wanted. Can you help to fix this ? Thank you very much
}