I am positive this has probably been answered many many times but I do not know the words to search for to find the answer. So here is the question
I'm using java and I have
int my_var = 3;
thing.myListener(new Listener() {
public void onStart(int posistion) {
my_var <-- I want to get access to my_var
}
});
How do I get access to my_var inside the onStart function. Also what is this type of problem called? Thanks!
myVarinstead of the PHP styled,my_var.