aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Character Problem!" Watch "Character Problem!" New topic
Author

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
 
 
subject: Character Problem!