aspose file tools*
The moose likes Beginning Java and the fly likes comparing chars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "comparing chars" Watch "comparing chars" New topic
Author

comparing chars

Erkki Veps�l�inen
Greenhorn

Joined: Feb 10, 2004
Posts: 9
Hi,
How can I compare if two chars are the same, "equals" doesn't work here.
Thanks
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
Since chars are primitives and not objects, you can use == to compare them.
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
Perhaps like this :roll:


- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. <br />- What truth? <br />- That there is no spoon!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: comparing chars
 
Similar Threads
passing arguments from command-line to Point(x,y)
Regex to see if invalid chars are present
What is the numerical range of a char?
Help with parse string into object
String index out of range: 1