摘要:
1. 在执行速度方面的比较:StringBuilder > StringBuffer 2. StringBuffer与StringBuilder,他们是字符串变量,是可改变的对象,每当我们用它们对字符串做操作时, 实际上是在一个对象上操作的,不像String一样创建一些对象进行操作,所以速度就快了。 阅读全文
posted @ 2017-06-29 17:59
大腮鱼
阅读(127)
评论(0)
推荐(0)
摘要:
1 public class Solution { 2 /** 3 * @param s A string 4 * @return the length of last word 5 */ 6 public static int lengthOfLastWord(String s) { 7 if (s == null |... 阅读全文
posted @ 2017-06-29 16:42
大腮鱼
阅读(117)
评论(0)
推荐(0)
摘要:
1 public class Solution { 2 /** 3 * @param string: An array of Char 4 * @param length: The true length of the string 5 * @return: The true length of new string 6 */ 7 ... 阅读全文
posted @ 2017-06-29 15:58
大腮鱼
阅读(185)
评论(0)
推荐(0)
摘要:
1 public class Solution { 2 /** 3 * @param s input string 4 * @return the longest palindromic substring 5 */ 6 public static String longestPalindrome(String s) { 7 ... 阅读全文
posted @ 2017-06-29 14:41
大腮鱼
阅读(142)
评论(0)
推荐(0)

浙公网安备 33010602011771号