This post originated from an RSS feed registered with Java Buzz
by Peter Karich.
Original Post: News on an old Java Wisdom
Feed Title: Java and more ...
Feed URL: https://karussell.wordpress.com/category/java/feed/
Feed Description: Just another weblog. Its about my developer experiences with Java in general. In detail I will blog about NetBeans, Eclipse, Design Patterns, News, Web Frameworks and other tools. My focus will be open source tools, which make the life of a Java developer easier.
I am fully aware of the brace initialisation of anonymous classes, but I didn’t know that this can help to improve readability of Java programs until I read this nice post:
Map<Integer, String> map = new HashMap<Integer, String>() {{
put(1, "one");
put(2, "two");
put(3, "three");
put(4, "four");
put(5, "five");
}};
The author said that this could help in [...]