public static void main(String[] args) { char val = 'a'; String vals = val + ""; System.out.println("Lower Case: " + vals.toLowerCase()); System.out.println("Upper Case: " + vals.toUpperCase()); }
The general solution to this problem is very simple to lay out, but part of it relies on what a "special character" is. The part of code which handles this will be highlighted for the reader to implement as he/she will. void displayType(char c) { if(Character.isUpperCase(c)) { // upper case System.out.println("Upper case"); }else if(Character.isLowerCase(c)) { // lower case System.out.println("Lower case"); } else { // special case // This is where the "special character" part comes in. // You may be defining a "special character" as any non-letter character, // in which case you can simple put the line to print it out in this else // block. A "special character" may also be any non-letter, non-digit // character, and so we would need to check for Character.isDigit at // this point. } }
I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c >= 'a' && c <='z' ) System.out.println("LowerCase"); else if( c>='A' && c <='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }
%%c %%D %%DIA c%%
a character that displays on the screen, but does not print
They are hidden known as the special or hidden characters. It is actually possible to print them, though by default they don't print.
Please see this example as below. <?php $first_variable = "Heloooo"; function first_method(){ print 'Heloooo'; } class firstClass{ public $testvar=""; function firstClass(){ // initialize $this->testvar = "Hiiiiiii"; } function first_method_inclass(){ print 'Heloooo'; } } ?>
To solve this you need to remember that chars in C are represented as ints. Because of this property, you can use int comparison operators: // to test if character c is a letter int is_alpha(const char c) { if( c >= 'a' && c <= 'z' ) return 1; if( c >= 'A' && c <= 'Z' ) return 1; return 0; } // to test if character c is a digit int is_digit(const char c) { if( c >= '0' && c <= '9' ) return 1; return 0; } To test for a "special character" you would probably do best writing a similar function which checks for other ASCII value ranges.
No two nose prints are alike a dogs nose print is like our finger print.
I advise against it. Write them in regular print.
winnie the poo
In typesetting computers or initialising printers yes you could call it character formatting or print formatting
Defamation of character in print would be libel. http://en.wikipedia.org/wiki/Libel_%28disambiguation%29