I am trying to use Shared Preferences in Java to store a variable so that any time I run the program it will retain its count. I am just not sure how to use it. Do I need to create the Share Preferences class or can I use it for example my code looks like this.
if(action.equals ("insert")
{
int booking_id = (initially be zero);
booking_id += 1;
// I want booking Id to retain its value and not become zero the next time I run it.
}