Best way to solve this? (Multidimentional array with strings as "keys")
I should begin with saying i'm totally new to Java. I've programmed in PHP (and some C#) before, so i've got some experience behind my back. In PHP, you can create a multidimentional array by doing:
'key' => 'val',
'another key' => 'another val'
But it appears you can't name the "keys" manually in java, at least not with strings. So what's the best way to go about this? I'm going to use it for a data access layer class that will loop through the array and use the Keys for columns, and the Values for... values. I could do this by using two different arays, one for Columns and one for Values, but i feel there must be a better solution to this.
I've been reading about Enums, would that be a good choise?