How to use Special Chars in Java/Eclipse

后端 未结 7 1201
被撕碎了的回忆
被撕碎了的回忆 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:33

    Either change your encoding to one which will cope, e.g. UTF-8, or find the relevant Unicode number and use a \uxxxx escape sequence to represent it.

    0 讨论(0)
提交回复
热议问题