I was going through the code all of which gets invoked while constructing a Timer class object. I could see the following
public class Timer {
/**
* The timer task queue. This data structure is shared with the timer
* thread. The timer produces tasks, via its various schedule calls,
* and the timer thread consumes, executing timer tasks as appropriate,
* and removing them from the queue when they're obsolete.
*/
private **final** TaskQueue **queue** = new TaskQueue();
/**
* The timer thread.
*/
private **final** TimerThread **thread** = new TimerThread(queue);
Could some one please explain me the need for declaring queue, thread object references as final ? They anyway are declared private variables.
Thanks!