In the getter of my class the attribute may have null value from database :
public String getCible() {
return cible.equals(null) ? " - " : cible;
}
In my code I want to call this getter , but I got NullPointerException.
If I change the comparison to return cible == null ? " - " : cible;
then everything is wright :) So why ?