This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
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).
posted 14 years ago
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