Does anything like the C++ Standard Template Library exist?
Yes, only it’s better and simpler to use. It’s called the Java Generic Library. This library (JGL) is freely downloadable from http://www.objectspace.com/ It includes about a dozen nice data structures (including sets and bags) and algorithms like unions, searching, and sorting. It has over 100,000 users and 11 OEM distributors. [Some Java vendors are bundling it with their next release] • (Sect. 17) What happens to post-increment when an exception is thrown? If you have the code: array[i++] = foo(); and foo() throws an exception, i will be incremented anyway. This can cause problems if sometimes foo() throws an exception and you don’t want i incremented in cases when it does. This is a consequence of JLS 15.25.1 and 15.6.1 “the left-hand operand of a binary operator appears to be fully evaluated before any part of the right-hand operand is evaluated.” (assignment is taken as a binary operator). Note that this is not how C++ behaves.