Hi, I'm working on a program that needs to store user info, then can retrieve it at any time, even after it has been shut down and restarted.
Is there any way that I can do this?
I tried looking online, but couldn't find anything....
Hi, I'm working on a program that needs to store user info, then can retrieve it at any time, even after it has been shut down and restarted.
Is there any way that I can do this?
I tried looking online, but couldn't find anything....
Check the java.io package APIs, and go here for a tutorial: http://java.sun.com/docs/books/tutorial/essential/io/index.html
> I'm working on a program that needs to store user info, then can
> retrieve it
In short, your program needs some sort of persistence mechanism. You have a few options:
- Object persistence [search the web for java serialization API]
- File persistence [saving the data in the form of CSVs]
- Database persistence which again comes in two flavors:
--- Serverless databases like SQLite, excellent for standalong apps
--- Server databases like Oracle recommended for n-tier distributed applications.
Take your pick.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.