My current code is as follows (note that getId() returns a string value):
if(person.getId()==null){
//do something
else{
//do something else
}
However, I am still getting a null Pointer exception if the value for person.getId() is null.
How can I fix this?
Aucun commentaire:
Enregistrer un commentaire