when im doing java programming for a web application,faced this java error “java error boolean cannot be dereferenced” how can i fix this java error boolean cannot be dereferenced ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Janhavi
There are various ways this error can arrive and similarly, ways to remove the error.
The most important thing to remember is that Boolean is a primitive data type, either True or False. A primitive data type is not an object to call a method or an attribute on it.
Maybe the program has the code where you are trying to change the value of the Boolean to a string representation of true or false. In this case, take out the Boolean.
If you are trying to compare a Boolean against a variable, it will reach this error. Do not put a string to a Boolean.
If you could share your program, we are happy to help rectify this error.