operator ! cannot be applied to java.lang.String
hi,
i receive an error on this line -- if (salesPersonsName
Fenerbahce
Junior Poster in Training
62 posts since Apr 2006
Reputation Points: 15
Solved Threads: 0
you can't negate a String, only a boolean.
I've no clue what you're trying to accomplish there so can't help you out.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Are you trying to say "not less than", if so why don't you just say "greater than"?
>
// instead of
<!
Edit: Nevermind, I'm an idiot, they're Strings so greater than and less than are not what you want anyway. Doh!
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
I knid of doubt that will help though, as the majority of peoples names (as the variable implies that that that is) will not be alphabetically less than end. What the OP probably wants is if (!salesPersonsName.equals("end")) . And this thread is bit old, anyway. I doubt the OP is still looking for a solution.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
I knid of doubt that will help though, as the majority of peoples names (as the variable implies that that that is) will not be alphabetically less than end. What the OP probably wants is if (!salesPersonsName.equals("end")) . And this thread is bit old, anyway. I doubt the OP is still looking for a solution.
I guess I'm missing something here. Unusual for you to reply an old thread. Did somebody posted something? Did any moderator moved anything?
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
Someone must have moved something, or something, as this popped up in my mail as if it had been replied to, and now that I look at the post above mine, I realise that that post is old too, I had just assumed it was just posted. ;-) Ah well, sheet happens.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494