Cannot be resolved to a variable error in Eclipse
Try this… – The problem here is about the scope of the variable. – i should be declared of type int, which is local to the run() method instead of n, as n is another local variable in fibNumber() method. – i and n are totally in different scope and are invisible to each other.