2 Topics
|
|
I couldn't save the new things when i tried to pass in new value inside inner class. The error message is local variable item is accessed from within inner class; needs to declared final. Guide me please. thanks in advance [CODE] public class Broadcast{ protected String title; public Broadcast(String title){ … |
|
|
Hello people, I created an innter class like this [CODE] public class OuterClass{ int attribute=0; class InnerClass { public void method1(){ attribute++; } public void method2(){ System.out.println(attribute); } }[/CODE] My problem is when I call method2() in a correct way, it displays 0 and not 1 as I wanted. Can … |
The End.