Comparison between hashmap and hashtable:
1. Both hashmap and hashtable are implementation classes of the map interface. hashmap removes the contains method of hashtable and changes it to containsvalue and containskey.
2. In hashmap, null can be used as a key, and there is only one such key. One or more keys can correspond to null values. Hashtable is not allowed.
3. the biggest difference is that the hashtable method is synchronize (synchronous), but hashmap is not. When multiple threads access hashtable, they do not need to implement synchronization for their own methods, hashmap must provide external synchronization for it.
Comparison between connection and connections:
1. Collections is a Java. util class that contains various static methods related to set operations.
2. collection is an interface under java. util. It is the parent interface of various collection structures.
Interface concept (interview for a person in the group: Can the interface be included ):
1. interfaces are special abstract classes. Special member methods in interfaces must be abstract methods and member variables must be constants.
The member methods in an abstract class must be abstract methods and can contain implemented member methods.