标签:os ar sp ad ef new bs as ui
1, .intern() method, return String
call .intern() method, will try to add current string into the pool, if the pool already has the string, the method will return the ref to the existing string; otherwise, it will add the string into the pool.
2, Reverse a String
new StringBuilder(str).reverse().toString();
3, change case
.toLowerCase(), .toUpperCase()
4, Compare
.equalsIgnoreCase(String anotherStr) return boolean.
.compareTo(String anotherStr) return int 0 or negative or positive.
.compareToIgnoreCase(String anotherStr).
5, to chars
.toCharArray() return char[]
.charAt(int index) return char
标签:os ar sp ad ef new bs as ui
原文地址:http://www.cnblogs.com/chayu3/p/4014590.html