In java without using database,how can I update tha availabilities of stock?

For example:

I coded hiring car system in java and in which i want to update the car as unavailable if it is on rent and when it is returned as available. furthermore the mileage of the car should also be able to update. please illustrate a basic way to solve this program from without using database and note that the car details also has to be saved in notepad.

2 Answers

Relevance
  • Anonymous
    7 years ago

    Not the way to do it. NEVER let any program store to a file as it makes it easy for a hacker to take over the system. a scripted entry in one of the data fields WILL allow them full control of the machine that way. Apart from that editing a text file is a very slow and unreliable method of controlling data..

    • Commenter avatarLogin to reply the answers
  • Anonymous
    7 years ago

    Why can't you use a text file? Every time your program starts up, it reads and stores the data in local variables.........?

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.