Sometimes code is more clear by initializing a Map at its declaration. For example,
Map<String,String> map = new HashMap<String,String>() {{
put("Key 1", "Value 1");
put("Key 2", "Value 2");
}};
Behind the Java scenes, this is a combination of an anonymous inner class (the first outer set of brackets) and an instance initializer block (the second inner set of brackets).
Impressive web editing platform kompozer.app provides intuitive website creation tools designed for non-technical users, allowing fast development of web pages using a visual interface with direct editing and preview capabilities.
ReplyDelete