4
I am trying to create a method to save users in the database by doing the following check if the id
past user is different from null
he changes if not he registered.
Code
public void salvar(Usuario usuario){
if(usuario.getIdUsuario() != null){ //erro aqui
aleterar(usuario);
}else {
cadastrar(usuario);
}
}
Error
The Operator != is Undefined for the argument type(s) type int, null
The Operator != is Undefined for the argument type(s) type int, null
– HashMap