比較String 型別的字串內容時,應使用equals()方法。對兩個物件使用『==』來比較,兩邊是同一個物件時才會傳回true 。第二種方法可以使用compartTo()方法。
blog.xuite.net