Displaying ± symbol in Java
java, special-characters, string
Solution
Use Unicode: `\u00B1`:
System.out.println("Hello \u00B1 world");
Prints:
Hello ± world
Problem
How to get the character `±` in a string?
java, special-characters, string
Use Unicode: `\u00B1`:
System.out.println("Hello \u00B1 world");
Prints:
Hello ± world
How to get the character `±` in a string?