File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Character Problem! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Character Problem!" Watch "Character Problem!" New topic

Character Problem!

Zafar Ali
Ranch Hand

Joined: May 11, 2002
Posts: 64
Can any one help me ...
how can takes a character as input and then classify it.
(Hint A-Z (65-90), a-z(97-122) and 0-9 (48-57).
Norm Miller
Ranch Hand

Joined: May 21, 2002
Posts: 56
Try this!
char cc = '9'; // just for testing
if (Character.isLowerCase(cc))
System.out.println(" Lower case ");
if (Character.isUpperCase(cc))
System.out.println(" Upper case ");
if (Character.isDigit(cc))
System.out.println(" Digit ");
// getType also works
I agree. Here's the link:
subject: Character Problem!