如何仅使用键盘而不是从网站复制来在 IDEA 中输入复选标记?例如复选标记是 ✓ 或 ✗

How to input a check mark into IDEA only by using keyboard instead copying from website? For example the check mark is ✓ or ✗

我从网站上得到了 ✓ 和 ✗。我只想通过键盘输入它们。我如何处理它?

您可以在 println 语句中使用 Unicode 十六进制值:

System.out.println(se.execute() == 1 +2 * (9 - 5) ? "\u2713" : "\u2717");

\u2713 是 ✓

\u2717 是 ✗

此外,可以使用键盘快捷键放置此类符号:

例如在 Windows 中:Alt +2713Alt +2717