經安全檢測,此網站為安全網站,請放心前往原始網址!

[Java] 字串比較 String compare | Andro Tips - Web Development How-to

在Java中若單純要比較兩個字串,盡量不要使用 == The == operator checks to see if two objects are exactly the same object. 建議使用 equals() 以下是範例 String s = "test", t = "test"; if (s == t) // Legal, but usually WRONG. if (s.equals(t)) // RIGHT if (s ...

androchen.blogspot.com

網址安全性掃描由 google 提供