枚舉類 實例的比較使用== 或 equals

2個枚舉對象的對比 是否 同樣使用== 和 equals均可以,this

由於equals裏面也是調用的==code

public final boolean equals(Object other) {
        return this==other;
    }
相關文章
相關標籤/搜索