PDA

View Full Version : what type is this? {"name":"value"}


shedokan
06-11-2009, 07:40 PM
Hello,
I'm really new to java and I don't know how to do this(jaascript) in java:
variables={
"name1": "value1",
"name2": "value2",
"name3": "value3",
};

I tried Object, String[] and nothing works.

thanks.

Fou-Lu
06-11-2009, 08:02 PM
I assume you're asking what that would be if it were java?
That would be a hashmap or similar map type. Anything that combines a key to value pair. Java has a built in hash map class.

shedokan
06-11-2009, 08:36 PM
Yes, and thanks I found out all I need using Exlipse.

thanks.