Amazingly simple - Collection Initialization

On Todd Huss' blog I just came about a very simple way of initializing a collection with a set of predefined values. It is so simple that it is amazing people do not use it way more often. For my part, I have seen this use of instance initializers for the first time, although they are nothing sooo special...

Comments

Popular posts from this blog

SAXParseException: -1:-1: Premature End Of File - Misleading error

Can't start server: Bind on TCP/IP port: No such file or directory

FindBugs - Writing custom detectors (Part 1)