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

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -