未完 Java Tips & Tricks & Notes
程序员文章站
2022-03-17 18:53:59
...
Hidden Features of Java:
http://*.com/questions/15496/hidden-features-of-java
Double Brace Initialization:
http://howtodoinjava.com/2012/11/20/double-brace-initialization-in-java/
http://*.com/questions/924285/efficiency-of-java-double-brace-initialization
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"); }});
Conversion between Delimited String & Collection:
Delimited String -> Collection:
http://*.com/questions/7488643/java-how-to-convert-comma-separated-string-to-arraylist
List<String> items = Arrays.asList(str.split("\\s*,\\s*"));Collection -> Delimited String:
Spring-core.jar 的 StringUtils 是个不错的选择:
StringUtils.collectionToDelimitedString(userIdList, " ")
Paging of Java List:
http://*.com/questions/12214894/java-paging-util
http://vozis.blogspot.com/2012/01/paging-in-java.html