wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes not equals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "not equals" Watch "not equals" New topic

not equals

Tyler Jordan
Ranch Hand

Joined: Nov 17, 2003
Posts: 70
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. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Don't get me started about those stupid light bulbs.
subject: not equals
Similar Threads
what is hashcode and equals contract?
Hibernate supports equals and not equals
about if-else
confusion between == & equals( )
a question waiting to be cleared