java 如何在java中显示特殊字符?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13486410/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 12:56:46  来源:igfitidea点击:

How to display special characters in java?

javaspecial-characters

提问by HelpNeeder

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

那么,如果可能的话,如何在不使用 Unicode 的情况下在 Java 控制台应用程序中显示这组字符?

? ? ? ?

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

它们是通过按Alt+(3/4/5/6)按钮组合创建的。

回答by PC.

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

显示心脏 System.out.println("\u2764");

You can find Java encoding for unicode characters here

您可以在此处找到 unicode 字符的 Java 编码

回答by Abraham P

With Unicode this is a simple problem:

对于 Unicode,这是一个简单的问题:

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

System.out.println("UNICODE IDENTIFIER 进入这里");

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

没有Unicode?我不认为这是可以做到的。