简体   繁体   中英

How to display special characters in java?

So, how would I display this set of characters in Java console application without using Unicode, if possible?

♦ ♥ ♣ ♠

They are created by pressing Alt + (3/4/5/6) button combination.

to display heart System.out.println("\❤");

You can find Java encoding for unicode characters here

With Unicode this is a simple problem:

System.out.println("UNICODE IDENTIFIER GOES HERE");

Without Unicode? I don't think it can be done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM