0
How to get a boolean true or false to display a value
I have code that says: If the married status is single return false or if they are married return true. When i display the boolean is only says false or true, is there a way to display single or married. Thanks
2 Respuestas
+ 1
yes, you can use print statement as follow:
if(marriedStatus==single)
{
System.out.println("single");
return false;
}else{
System.out.println("married");
return true;
}
0
Thanks