I want to set a boolean value to either true or false.I kept data base type as java.lang.boolean
. and I want to write a code If the checkbox is selected It should be saved and I should be able to see in the frontend part. Can anyone suggest me with the right code. Below is my code
public Boolean setSelected(Boolean abool)
{
if (abool=="Y")
abool = true;
else
abool = false;
}
In this code I am missing something and getting error Incompatible operand types Boolean and String.