Java Characters

Characters are represented by codes. ASCII is a standard for alphabets and a few symbols. For example, the code 65 is used for the letter 'A'

char c1 = 65;
System.out.println(c1);

Will print the character A.

Modern Java compilers and Operating Systems are aware of Unicode characters. Unicode is a standard system of encoding characters in all known scripts.

Here's code to print the recent 'Rupee' symbol:
char c1 = 0x20b9;
System.out.println(c1);

Will print the symbol 
If you don't have a local Java compiler, you can use this online compiler.

Explore Unicode. Share some characters and the corresponding codes of your mother-tongue.

Click here to power back

Comments

Popular posts from this blog

Relationships in a Relational Database

Data Schema and Blobs

Power On!