+ 1

How to handle my program's data ? - JAVA

When you have to store important data like users, passwords, etc in temporal files, what would be a good way to do it ?. Ive seen that there are specific classes and external api's to do this, like log4j or the one that comes incorporated in java.util.logging. My biggest problem is reading this info. If I need to read some specific data from this file, how do I do it ?

22nd Dec 2019, 7:05 PM
Matias
Matias - avatar
2 Antworten
+ 9
I imagine Java can use SQLite. It's a SQL database that's just a single file. Good for when you need the benefits of a database but want something lightweight.
22nd Dec 2019, 11:28 PM
Ahri Fox
Ahri Fox - avatar
+ 6
In android dev As Ahri Fox said java used sql lite database for storing data in you device persistent storage. But you only use sql database to save the email or password, this is not a efficient way because it takes a some time to finish. Thats why android creats new data storing class called shread preferance to save your simple data (like strings or int ) in very faster way to your local files. if you want cloud based database use firebase
23rd Dec 2019, 11:04 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar