How to use Special Chars in Java/Eclipse

后端 未结 7 1367
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 10:39

How can I use/display characters like ♥, ♦, ♣, or ♠ in Java/Eclipse?

When I try to use them directly, e.g. in the source code, Eclipse cannot save the file.

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 11:12

    Finding the unicode escape sequence: see these Unicode charts. Your characters are in the Misc. Symbols chart, \u2660 and up.

提交回复
热议问题