2

Is it possible to do associative arrays in Android? Are there libraries that enable this, if not natively?

ina
  • 18,561
  • 37
  • 117
  • 197
  • 1
    Possible duplicate of http://stackoverflow.com/questions/5122913/java-associative-array – ambagesia Jun 24 '11 at 19:38
  • Yes, the other thread was already there, but it's for Java. I was hoping there might be an associative array support in Android – ina Jun 24 '11 at 21:01

1 Answers1

2

Android supports the Java Collections Framework. You can use a Map object for associative storage and retrieval. The Java language does not support subscripting notation for associative access; you need to use method calls (get, put, etc.) for that.

Ted Hopp
  • 227,407
  • 48
  • 383
  • 507