[Solved] Where does Java store the data?


Constructor create object in memory only, and once your app is closed or pc shutdown your data will be lost,

store data in a file is useful to store application settings, you have to use an xml or a properties file.

If you want to store your business or other data in a database, you have to learn the java persistence API ,some relational database and some persistence provider and your object (class) must implements serializable interface.

if you need to store and manage a very huge data (BIG DATA) you have to use NoSQL database.

0

solved Where does Java store the data?