This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Here, as I understand, the key is a string - and value is an int...
Yes, you are quite right. You can also do it like this:
or like this if you want it to start out nonempty:
And, of course, you can use other types too.
You are also right that Go only supports post increment, i++. Also, increment is not an expression, so you can not write j = i++ in Go. This avoids lots of potential problems, e.g., f(i++) and f(++i) are legal in C but not in Go.
And in your solution to exercise 44 you return a map that you've allocated inside a function: and this is perfectly good Go style (but would be a disaster in C/C++!) thanks to Go's memory management.