Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Howto create array of String "structures" in jsp?

This is probably very elementary, but how would I create an arrary of structures in jsp? Here's the C version of what I want:

typedef struct {
    char     *abbrev;
    char     *name;
} STATES ;

STATES states = {"AL","Alabama", ... };

states[0].name // references "Alabama"

I don't want to create any external class files, etc.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

objects - thanks, I used your solution and it was simple. I thought there might be something a bit more elegant than a 2-D array, but I suppose that also means far more complex.

basav_com - thanks for the links, although I didn't see any actual code on the HashMap list, but maybe I didn't look hard enough.