Unable To Access Variable In Onclick Method
I'm setting up an onclick method and i cannot access an int that i have set up in its parent method, is there a different way to use the Int? here is the code: Date past = new Date
Solution 1:
In order to refer the variable from an inner class, you need to make the variable final
:
final int days = Days.daysBetween(new DateTime(past), new DateTime(today)).getDays()+1;
Post a Comment for "Unable To Access Variable In Onclick Method"