I am trying to do the following expression in java:
String name = request.getParameter("name");
String email = request.getParameter("email");
String password = request.getParameter("password");
if (!name || !email || !password) {
model.addAttribute("error", "Enter all fields please!");
}
return "register";
However, I get an error that complains about the !
operator. What would be the correct way to do the above if
statement?