Back to Library
QID: #63436
Solution for QID #63436: Can a boolean variable equate itself? For example, if boo | StudyHelpMe
Can a boolean variable equate itself?
For example, if booleanVariable has been initialized as True, and we have a booleanMethod() checking whether something evaluates to true/false; would the second underlined statement be doing a comparison between the booleanVariable and the booleanMethod result and saving said result in booleanVariable? If so, why not just equate booleanVariable to the booleanMethod() itself?
Example code:
boolean booleanVariable = True; //initializing booleanVariable
booleanVariable = booleanVariable && booleanMethod();
ZERO AI
Human Written
Human Written
PHD EXPERTS
Verified
Verified
TURNITIN
Clean Report
Clean Report
FAST DELIVERY
Instant/Hourly
Instant/Hourly