Implement Maps in java It contains values on the basis of key i.e. key and value pair. Each key and value pair is known as an entry. It contains only unique keys. It is useful if you have to search, update or delete elements on the basis of key. Methods of Map interface · put(Object key,Object value)-inserts an entry into map · get(Object key)-returns value for specified key · remove(Object key)-removes an entry for the specified key · containsKey(Object key)-search specified key from the map · keySet()-returns Set view containing all keys · entrySet()-returns Set view containing all keys and va...
Charvik provides an education and shares Knowledge to reach your goals.