User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 391,670 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,023 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 2128 | Replies: 3
Reply
Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

operator ! cannot be applied to java.lang.String

  #1  
May 4th, 2007
hi,

i receive an error on this line -- if (salesPersonsName <! "end") --

error : operator ! cannot be applied to java.lang.String

what can i do?

thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 191
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: operator ! cannot be applied to java.lang.String

  #2  
May 4th, 2007
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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,360
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 117
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: operator ! cannot be applied to java.lang.String

  #3  
May 5th, 2007
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!
Last edited by masijade : May 5th, 2007 at 2:42 am.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Mar 2007
Posts: 5
Reputation: eniacad is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
eniacad eniacad is offline Offline
Newbie Poster

Solution Re: operator ! cannot be applied to java.lang.String

  #4  
May 7th, 2007
if you want to compare strings use compareTo() method ex: oneString.compareTo(anotherString). if oneString is greater then anotherString the method will return value >0, it it is less --> value <0, and if they are equal -->value =0.

I hope that this will help you.

Cao
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 2:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC