java - how to implement a variable whose value is not lost after every run? -


i wish implement variable (in java) value either stored somewhere or not reset every time run program. it's related "booking reference number" flight program. know database connectivity make new data base 1 variable pretty pointless. ideas should/can do?
don't want numbers random want them in order if first booking id 100 next 1 should 101 , on.

organize data in structure , serialize it.when re-run program, serialized version in file system, if there any, read it. viola.!


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -