Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What will store a Key-Value list in Java or an alternate of C# IDictionary in Java?

I am new to java development, I am from C# .net, developing android application.

I am looking for Key-Value list to use in Java same as IDictionary in C#.

Thanks

like image 234
BreakHead Avatar asked Nov 09 '11 07:11

BreakHead


1 Answers

Use the Map<K, V> interface, and the HashMap<K, V> class for example. Or see the "All Known Subinterfaces" section in the Map<K, V> interface description for more implementations.

http://download.oracle.com/javase/6/docs/api/java/util/Map.html

like image 124
Matthias Meid Avatar answered Sep 30 '22 13:09

Matthias Meid