Use equals() to compare object references; avoid comparing them with ==.