java - Can my program save a variable permanently without resetting it's value everytime the program terminates? -
this should quite easy right? writing program allows users update integer value using input.nextint () , life span of variable terminates end of program, there way permanently save variable can use next time run program? here's scenario ,, user gets prompted enter value through input.nextint (), , enters 68 stored in num1, next time run program want start num1 having value of 68(what user entered), possible? , how?
all objects used program destroyed when program ends. must write value in external file such text file or database, read if when program starts again.
Comments
Post a Comment