I always initialize map like Map<String,Object> hsmap = new Hashmap<>()
(Assuming hashmap key is a String and value can be any object)
instead of
HashMap <String,Object> hsmap = new Hashmap<>()
As a best practice ,though I'm sure that I will never change this map implementation apart from hashmap for my requirement.
Is ther any other reason to initialize with 1st approach apart from being a best practice to code to interface ?