permaculture playing cards*
The moose likes Beginning Java and the fly likes IsUpper for non letters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IsUpper for non letters" Watch "IsUpper for non letters" New topic

IsUpper for non letters

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
How does isUpper work for non-letters? I am getting weird stuff
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
isUpper checks to see if it falls into a speciic range in the unicode set of characters. To avoid your strange results you could always test it before you check to see if it upper case. Use isDigit or isLetter to see what it is then test it accordingly.

Sun Certified Programmer for the Java� 2 Platform

wood burning stoves
subject: IsUpper for non letters