Im trying to store random id's in my code , but im trying to figure out how to store only unique id's how would i do that ?
public void storeCustomer (Customer newCustomer)
{
if(newCustomer.getCustomerID().equals("unknown"))
{
newCustomer.generatorCustomerID("ab-",6);
customerMap.put(newCustomer.getCustomerID(),newCus tomer);
}
else
{
customerMap.put(newCustomer.getCustomerID(),newCus tomer);
}
}