Manish S.
Bear Bibeault wrote:If you had added debug statements like I hinted at, you would have found the assignment error noted above.
A couple of other points:
Your form is generating a GET. A doPost() will not be called unless you specifically call it from doGet() (which is bad paractice). Match the method to the form. Never re-invent the wheel. Look on the Boolean class to see if there's a conversion that you can use instread of writing your own. Once you find the above, it will tell whether 0 and 1 are good choice for the values.
Brendan Cregan wrote:Thanks bear, but im only learning
I did look into the boolean conversion but it appeared as far as I could tell that I had to make the conversion myself.
What do you men by debug statements? what i did was just added a print out
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:Bear was talking about the error Manish Sridharan mentioned.
Manish Sridharan wrote:Hi,
In the below code you are not comparing the value of the variable instead assigning value of the answer variable to the variable myChoice.
Thanks,
Brendan Cregan wrote:i was confused with the assignment since it worked for !=
Bear Bibeault wrote:
Brendan Cregan wrote:i was confused with the assignment since it worked for !=
That's not an assignment, that's just another of the comparison operators: == != <= >=
The = operator is assignment, not comparison.
With Regards :-
Harmeet Singh
Police line, do not cross. Well, this tiny ad can go through:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|