Java associative-array
Java doesn’t support associative arrays, however this could easily be achieved using a Map. E.g., Even more accurate to your example (since you can replace String with any object that meet your needs) would be to declare: See the official documentation for more information