Kim Lauwers
,
Ranch Hand
Hello everyone,
Is there a site or something witch explanes me these two operators because I find them rather difficult.
Or if someone can explain me this shortly.
I'm using HFSJ for studying.
thx
Kim Lauwers
,
Ranch Hand
Little question about it.
When a have a map:
java.util.Map someMap = new java.util.HashMap();
someMap.put("key","value");
someMap["key"] -->will return value?
map[key]--> wil return null?
correct?
Balasubramani Dharmalingam
,
Ranch Hand
${someMap["key"]}
In this case it will return the object from someMap that mapped to string "key" will be return.
${someMap[key]}
In this case the value for the key ( equivalent to ${key} ) is evaluated then the object mapped for that value will be return.
Richard Green
,
Ranch Hand
java.util.Map someMap = new java.util.HashMap();
someMap.put("key","value");
someMap["key"] --> request.getAttribute(someMap.get("key")) --> value
someMap[key]--> request.getAttribute(someMap.get(request.getAttribute("key")) --> null
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com