Forums Register Login

boolean statements

+Pie Number of slices to send: Send
I am getting a big time error trying to get this boolean thing to work:



I am totally lost.
I need it to show true if the answer is abridged, and false if unabridged.
+Pie Number of slices to send: Send
Simply stating "I get a big time error" doesn't really help us help you. WHAT exactly is the error? Is it when you try to compile or when you run it? If it's a compiler error, what is the exact text of the error? If it's during run-time, what exactly is it doing wrong - what do you expect to happen, and what actually does happen?
+Pie Number of slices to send: Send
To add to Fred's comment..

you might want to check: isAbridged is not equal Abridged.

I am guessing so you need to explicitly explain the problem.

Gary
+Pie Number of slices to send: Send
Welcome to the Ranch
Please use the code button to post code, and make sure it is correctly indented. Since you are new, I have edited one of your posts, and you can see how much better it looks. But it shows an indentation error.
+Pie Number of slices to send: Send
replace the above line

with


and place
boolean abridged;

somewhere above this method...

+Pie Number of slices to send: Send
i think by doing that also your problem will not get resolved..
Please post a complete class.so that we can help you out in a better manner..
+Pie Number of slices to send: Send
It all depends how many booleans you have meaning abridged. It is usual to have a field called abridged and methods called setAbridged() and isAbridged(). See this PDF ยง8.3, page 55.
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 704 times.
Similar Threads
Mapraputa Is
Accessor for Boolean
How to Ensure I'm NOT Passing RMI Objects I don't Mean to
Classes
Boolean.valueOf(boolean) vs Boolean.valueOf(String)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:48:10.