This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
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: 805
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...)
 
GeeCON Prague 2014
 
subject: not equals