I am trying to create a method to save users in the database by doing the following check if the id
of the last user is different from null
it changes if it does not register.
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