.matches() v.s. .equals() v.s. ==
.matches()matches(String regex)
Tells whether or not this string matches the given regular expression.
比較兩者的 正規表示式
.equals()比較兩者的 正規表示式
equals(Object anObject)
Compares this string to the specified object.
比較兩者的 值
唯有當兩個參考指向同一物件時,==運算子的結果才為true。
即比較物件內的(實體、記憶體空間)是否相同