Create an object with the name passed in as a string argument to a method
Hi,
I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
I have a method
void abc(String object_name, String key, String value)
method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
If yes ..just put the key and value there.
if not , then create the hashmap object called <object_name> and insert the key/value there.
Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
Will getInstance method be of any help?
Thanks in advance for your response.
-Sub-java

