>>inventorysupplystock2.java:45: ')' expected } // end method
>>setRestockingFee and
[quoted text clipped - 4 lines]
> total strangers are going to be able to help you more than your
> compiler already is?
... because total strangers can explain the problem (as you did) in a
language that normal people can understand ;-) I was going to be
facetious and write which part of the compiler message did you not
undertand but on second thought remembered the many blind spots I had
until I became familiar with computer obscurantism.

Signature
Inform all the troops that communications have completely broken down.
>> resstockingFee = (value * 5%)
> You cannot use the percentage sign like that; Java's numbers aren't
> aware of percentages. You need to use the number that 5% represents
> (0.05).
>> public void setRestockingFee(double restockingfee)
>> {
>> resstockingFee = (value * 5%)
>> } // end method setRestockingFee
The method does not use the input parameter.
The target of the assignment has not been defined.
Thinking through error messages may seem tedious, but it is an essential skill
for a developer. There is no workaround; you must know how to read compiler
errors.
If the compiler indicates "')' expected" at a particular place, take a look at
the place. What is there instead of a parenthesis? But there is a
parenthesis, right after the percent sign. Hmm, must be something about the
percent sign that is messing up the compiler and hiding the parenthesis.
Wait, isn't percent-sign not a part of the Java language? Drat - ok,
substitute the actual legal Java constant, in this case 0.05. Cool, it fixed
the error message, but what's this new compiler error about a missing
declaration? That variable declaration is right up top over here ...., oh,
it's spelled differently. Fix the spelling - hey, another error gone.
- Lew
Luc The Perverse - 06 Nov 2006 21:34 GMT
>>> resstockingFee = (value * 5%)
>
[quoted text clipped - 24 lines]
> here ...., oh, it's spelled differently. Fix the spelling - hey, another
> error gone.
Sometimes it is best not to try to interpret what the error message is
telling you, but rather what could possibly be wrong (At least in the case
of mismatched parenthesis, syntax errors and other things which seem to
violate intuition)
You can also comment blocks of code out - and narrow down where your true
syntax error is coming from that way.
--
LTP
:)
porky008 - 07 Nov 2006 05:27 GMT
> >>> resstockingFee = (value * 5%)
> >
[quoted text clipped - 37 lines]
>
> :)
thanks for the help