Keith Devens .com |
Sunday, October 12, 2008 | ![]() |
| Men never do evil so completely and cheerfully as when they do it from religious conviction. – Blaise Pascal (attributed) | ||
|
| ← Brandon Harper » Simple Integration of Ant and Subversion | IBM developerWorks: Connect KDE applications using DCOP → |

146.50.22.99 wrote:
Keith (http://keithdevens.com/) wrote:
What do you think? You get object references back from getKey() and getValue(). So 1. You obviously can't assign to them and modify what the map points to. 2. If there are any mutator methods on the objects you can of course call them. Java doesn't have any "const" references like C++ does.
212.118.224.34 wrote:
This has been immensely helpful time and time again. Thank you so much.
98.15.252.31 wrote:
Stephen Coulborne made a prototype compiler that allows:
for(KeyType k, ValueType v : map) { // do something with k and v. }
98.15.252.31 wrote:
where KeyType/ValueType are replaced by their respective data type
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.194s.
(Used 8 db queries)

Hi, Can we change the value of each entry of the Map inside the for each ? Or is it just read only ?