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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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...)
I agree. Here's the link: http://aspose.com/file-tools
subject: not equals
Similar Threads
confusion between == & equals( )
about if-else
a question waiting to be cleared
Hibernate supports equals and not equals
what is hashcode and equals contract?