1. == 用来测试reference是否相等(whether they are the same object). 是否同一个对象? .equals() 用来测试 value 值是否相等 (whether they are logically "equal"). 是否值相同? 记住下面的几个情况: // These two have the same value(相同值) new String("test").equals(" ...

    阅读全文
  2. Normally use the String concatenations using :  +, StringBuffer.append(), String.concat(). We always think that using ‘+’ operator for String Concatenation is slow.  This is true but not always. For Ex: String str = “Th ...

    阅读全文