user10873676 wrote:Search for in memory databases for java. HSQLDB is a good one to start with.
This is a sample scenario
I am taking interviews daily, I need to store candidate name, gender, dob, phone number in a java program
I do not want to store it at any other secondary storage like db, flat file etc.. As soon as i switch off the system the data should be lost
What is the best method that i can store it in a java program...
I came across this question where someone asked me and i replied that i will store it in arrays, but here for array i have to define size.. so may be on a day there are only one to two entries so un-necessarily i do not want to waste the memory is there any other better way where i can store and performance also doesn't get impacted