HelpNeeder
HelpNeeder

Reputation: 6490

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.

Upvotes: 2

Views: 15621

Answers (2)

Abraham P
Abraham P

Reputation: 15481

With Unicode this is a simple problem:

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

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

Upvotes: 0

PC.
PC.

Reputation: 7024

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

You can find Java encoding for unicode characters here

Upvotes: 4

Related Questions