Look at the Preferences class.
Or if you'd prefer using a file, look at the Properites class