Users have certain expectations of your program. One of those expectations might be to have their preferences saved. This might include their username and password, the location of the application window, the size of the window, etc. Java’s Preferences API is an easy way to accomplish tasks like this without having to manually write and later read / parse a config file. This method is also platform independent; we don’t have to worry about where or how the data is saved — just that it is being saved and that it is persistent. Let’s see how to do it!
Jul
9th
