Printing a Sigma Character in Java

How to display "Σ" using the instruction System.out.println(); ... ??

PS: Using the Eclipse IDE

+4
source share
1 answer

According to http://www.fileformat.info/info/unicode/char/3a3/index.htm , the unicode value for this character is U + 03A3, so you just need to use the unicade escape sequence:

 System.out.println("\u03A3"); 

Now the problem is that the console on which String is printed must support Unicode and use a font that supports this character, otherwise you will probably see '?' instead of sigma.

+9
source

Source: https://habr.com/ru/post/1339635/


All Articles