thanks... but what is the statements exactly can i used from these code??
Well, if you just want to save a name/value pair, it seems as though the best approach would be preferences.
If you have more data, it would depend. Some simple (or not simple, for that matter) data could be saved as a file, or, if the data can be normalized, a database would be better.
So, really, you either have to read each of the sections and decide for yourself, or you need to provide more information about your applications.
Of course, if you can't decide on which type of persistent storage your application should use, perhaps you haven't designed it well enough to implement it yet?