Instantiate Dictionary in Java error

Dictionary is an abstract class in Java. It is also obsolete; you should use the Map interface instead; something like:

Map<String,String> map = new HashMap<String,String>();

Note that HashMap<K,V> is a concrete class, but we’re assigning it to a Map<K,V> reference, which is an interface. This is the recommended style in Java, because it allows you to switch HashMap for e.g. Hashtable at a later stage, without having to change everything.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)