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

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

android - Linear layout children not scrolling -