wouldn't the value of distanceAnnual change to what ever (distanceDay + amountAYear) is and then return that value?
It isn't a question of "wouldn't...?", it's a question of "does it ... or not?". In other words the task at this point is to see what is going on. The code I posted - which is just yours with a couple of lines added - should answer this question. Just add those two lines, compile and run.
At that point you should be able to answer Norm's three questions.
Could you explain why it return 0 ?
Well, it returns zero because that's the value of
distanceAnnual. Run the (ammended) code to see why. Or, if it's still not clear, describe what it does output.
[Edit] Massively slow
Well done! Yes, you have to call a method for it to do its work.