This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes not equals Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "not equals" Watch "not equals" New topic
Author

not equals

Tyler Jordan
Ranch Hand

Joined: Nov 17, 2003
Posts: 70
Hi,
Is there a "not equals" method for objects (opposite .equals())

I want to make: data[x][y] not equal to "*"
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
You could declare your own notEquals() methods if you have access to the class source code, or you could try something like:



Hope that helps!


Give a man a fish, he'll eat for one day. <br />Teach a man to fish, he'll drink all your beer.<br /> <br />Cheers,<br /> <br />Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: not equals
 
Similar Threads
what is hashcode and equals contract?
about if-else
a question waiting to be cleared
confusion between == & equals( )
Hibernate supports equals and not equals