Although my question arose from building an android application but i think its a general programming question in java.
I hava a set of three images which i want to load. Now loading the images takes time so there is a lag of around 2 seconds. What i am thinking is of maintaining a static variable array which will store the Bitmap of all the images.
This way when the user comes back to the screen i dont have to reload the Bitmap images but just take them from the Bitmap static array....
Although i am wondering if it can be stored in some other way say a db?
I want to know the pros and cons of storing a static variable and storing data in a database.
Is it a good idea to store the Bitmap somwhere else or store them in a static array ?
Can storing in static variable lead to bugs ? or is it a good programming practice ?