Which is often interpreted as that variable and function declarations are physically moved to the top of your code but this is not in the fact what happens behind the scenes. Instead the variable and function declarations are put into memory during the compile phase, but stay exactly where you typed them in your code.
Situation explained: I need to run some code which takes lots of time to finish and this “longRun” code should inform me its progress.
So I created a “Program” class. This class calls a function called “longRunning” of class “Compute”. After each iteration, this functions informs to Main class about its progress. Below are the code examples. Have fun!