I have a thread that updates an array every 5 minutes.
It works fine however outside of the threads run() method it seems I have no access to this array making it useless, any attempt I make to use it I just get null pointer exceptions.
I need the thread to update the array every 5 minutes but I also need to have access to the array from outside of this thread, what is the best way to do it?
Thanks
Declare the array as a private field of the class and instantiate it properly.
Example:
}