[color=red][b]Hidden Features of Java:[/b][/color]
[url]http://stackoverflow.com/questions/15496/hidden-features-of-java[/url]
[b]Double Brace Initialization:[/b]
[url]http://howtodoinjava.com/2012/11/20/double-brace-initialization-in-java/[/url]
[url]http://stackoverflow.com/questions/924285/efficiency-of-java-double-brace-initialization[/url]
[b]Conversion between Delimited String & Collection:[/b]
Delimited String -> Collection:
[url]http://stackoverflow.com/questions/7488643/java-how-to-convert-comma-separated-string-to-arraylist[/url]
Spring-core.jar 的 StringUtils 是个不错的选择:
[b]Paging of Java List:[/b]
[url]http://stackoverflow.com/questions/12214894/java-paging-util[/url]
[url]http://vozis.blogspot.com/2012/01/paging-in-java.html[/url]
[url]http://stackoverflow.com/questions/15496/hidden-features-of-java[/url]
[b]Double Brace Initialization:[/b]
[url]http://howtodoinjava.com/2012/11/20/double-brace-initialization-in-java/[/url]
[url]http://stackoverflow.com/questions/924285/efficiency-of-java-double-brace-initialization[/url]
List<String> list = new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");
list.add("one");
list.removeAll(new ArrayList<String>() {{
add("one");
}});
[b]Conversion between Delimited String & Collection:[/b]
Delimited String -> Collection:
[url]http://stackoverflow.com/questions/7488643/java-how-to-convert-comma-separated-string-to-arraylist[/url]
List<String> items = Arrays.asList(str.split("\\s*,\\s*"));
Collection -> Delimited String:
Spring-core.jar 的 StringUtils 是个不错的选择:
StringUtils.collectionToDelimitedString(userIdList, " ")
[b]Paging of Java List:[/b]
[url]http://stackoverflow.com/questions/12214894/java-paging-util[/url]
[url]http://vozis.blogspot.com/2012/01/paging-in-java.html[/url]