As I understand, there is a option in java to insert a new key to HashTable. This done by:
Hashtable<String,String> hashTable=new Hashtable<String,String>();
hashTable.put("Donald", "Trump");
Where donald is the key, and Trump is the value. If I want to add the value "TrumpY" to "Donald", than I use the same operation:
hashTable.put("Donald", "TrumpY");
I have a question about the time complexity of this operation. As I understand the time complexity is O(1). But this is relavant for the first and the second operation? because the first need to add a new key to the hash table, and the second need to add only a value to key that already exists.