I need help to know how to write this symbol in java (●). I have tried using the unicode of this page but it does not work. Thank you very much
I tried the unicode and it gave me exactly the same problem as you, it showed nothing more than a simple question symbol
I have put the symbol directly on the sout
System.out.println("•");
and I've been jumping on the next problem
I have simply given Save as UFT-8
And when I went back to running the code I already recognized it and printed it directly with the symbol or with the unicode
System.out.println("\u25CF");
Test the character bullet: (•) You get it with alt + 0149
How about testing with the following line: Java source code
System.out.println("\u25CF");
assuming the problem is not the Source Code File format (.java this in a non-Unicode format, eg Ansii)
This case is not due to Java, but to the application that you use to display the "Output" for example, if you use an IDE Netbeans, Eclipse, Jidea, etc. It is possible that these if they show you the correct result. for sample:
I use Windows 7. from the Windows terminal (CMD) or CygWin both show me a character that is not what I want:
Conducting a review regarding this aspect I found the following: How to use unicode characters in Windows command line in this question in StackOverflow in English shows us that Windows (CMD) has a problem to display Unicode characters in Console and to solve it requires changes that may or may not cause another type from problems.
In my case to solve this problem I used Cygwin or Powershell since I was unable to make it show the correct character with CMD:
As you can see the expected result is displayed when using the parameter -Dfile.encoding = UTF-8 on the command chcp and property Dfile.encoding
this can also be used in Powershell to solve the problem there: