You can print almost any character you like in Java, since it uses a Unicode character set.
To find the character you need, take a look at the charts here:
http://www.unicode.org/charts/
In the Latin additional document, you will see all Unicode numbers for accented characters. You should see the hexadecimal number 00E9 indicated for Ć©, for example. The numbers for all Latin accented characters are given in this document, so you should find this pretty useful.
To print the use character in String, simply use the Unicode \ u escape sequence and then the character code:
System.out.print("Let go to the caf\u00E9");
Produces: "Let go of the cafe"
Depending on which version of Java you are using, you may find StringBuilders (or StringBuffers if you are multithreading) more efficiently than using the + operator to concatenate strings.
source share