how to insert the ≠ sign into a string

character-encoding, java, string, utf-8

Solution

Set character encoding to `UTF-8`, pass this vm argument, if your text editor already uses UTF-8 or supports this character

-Dfile.encoding=UTF-8

Problem

What I want as an end result is this ``` System.out.println("This is the not equal to sign\n≠"); ``` to appear (when run) as ``` This is the not equal to sign ≠ ``` not to appear as ``` This is the not equal to sign ? ``` Is there any way to do this? I tried using windows character map, copied the symbol here, and in my code, but after changing encoding to UTF-8 and inserting it, it comes up as ? when run... What can be done? Thanks in advance for answers to this utterly simple question

Original source

Related problems