This is your resource to discuss support topics with your peers, and learn from each other.
Write an application that stores and uses persistent data.
Discover how to store data for an application.
Discover how to create objects that can persist.
Discover how to save and retrieve data.
In the IDE, open the music_stores.jdw workspace
Open the MusicStores.java source file.
In the static initializer, retrieve a reference to a PersistentObject using the store variable.
In the synchronized block, if the PersistentObject is empty, set its contents to a new Vector.
Retrieve PersistentObject contents and store it in a Vector. TIP: Use the _data variable already defined.
Add code to the StoreInfo inner class to define an object that can persist. TIP: Each object stores information about one music store.
Add code to saveItem to create a Save menu item that saves the music store information that users have entered.
Add code to getItem to create a Get menu item that retrieves and displays data from the last music store that was added.
In this exercise, you discovered the following things:
how to create a data storage area for an application
how to create a new type of object that can persist
how to retrieve data from a persistent data store
how to add data to a persistent data store