What is a matching java collection in the <string, string> dictionary

coming from the .Net world, I just want to know what the corresponding .Net Dictionary collection is

+3
source share
3 answers

Maybe:

Map<String, String> map

If you need ordered keys:

map = new TreeMap<String, String>();

If you want O (1) ops instead of O (log n):

map = new HashMap<String, String>();
+7
source

Interface Map<String,String>, implementation classes, HashMap<String,String>orTreeMap<String,String>

+2
source

You can use java.util.Properties , which extends Hashtableand uses Stringboth the key and value type.

0
source

All Articles