i have a simple question about the modifier "final" and the var being used in the run() method. here is a piece of some code that i have but the else doesn't work. i guess it cant add onto the firstTime var, im not sure if this is because you cant do this with final modifiers or if java just hates me :/
final long firstTime = System.currentTimeMillis();
WorldTasksManager.schedule(new WorldTask() {
@Override
public void run() {
if (System.currentTimeMillis() >= firstTime) {
stop();
} else {
firstTime += 5;
}
}
if you guys know whats causing this or how i can fix this, please help.
thanks in advance!