Community

The Right Way to Reverse a String in Java

(Jonatan Ivanov) As you probably know, Java uses UTF-16 to represent String. The char data type and the Character class are based on the original Unicode specification, which defined characters as fixed-width 16-bit entities.