This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Character Problem!
 
Similar Threads
Using contains/equals/== with random characters?
Delete Special Charecters form the String
Re: password policy
Legel Identifiers
Read rest of the string with Scanner class