public class Answer extends Object
Superior to Boolean in that you can pass it to a method as a parameter, that method sets the value to either true or false, and then see the answer after.
I.e. if a method finds the answer to a question while doing some calculations, it can mark the answer so another method doesn't need to do those calculations again just to see what the answer is.
I.e. in a method that gets something, might want some clue after as to from where that something was gotten from.
Constructor and Description |
---|
Answer() |
Modifier and Type | Method and Description |
---|---|
int |
getAnswer() |
boolean |
isFalse() |
boolean |
isTrue() |
boolean |
isUndefined() |
void |
setFalse() |
void |
setTrue() |
void |
setUndefined() |
Copyright © 2024. All rights reserved.