[Doi9t's answer](https://codereview.stackexchange.com/a/237527/192133) is very good, but even with his improvements, there is still a problem: your code does not produce the correct answer in all cases.
Java strings use [UTF-16](https://en.wikipedia.org/wiki/UTF-16) encoding. This means that a Java `char` is not large enough to store all Unicode characters. Instead some characters (for example, 😂) are stored as a *pair* of `char`s, and reversing the pair (as your code does) will result in nonsense data. See [this documentation](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Character.html#unicode) for more details.
Fortunately, the way UTF-16 is defined, `char`s that are _surrogates_ (half-characters) have a completely separate range of values from `char`s that are Unicode characters by themselves. This means it is possible to test each `char` individually to see if it is a surrogate, and then have special handling to preserve the pairs.
```
import java.lang.Character;
<...>
private static String reverseString(String myString)
{
StringBuilder reversedString = new StringBuilder();
for (int j = myString.length() - 1; j >= 0; j--)
{
char c = myString.charAt(j);
if (Character.isLowSurrogate(c))
{
j--;
reversedString.append(myString.charAt(j));
}
reversedString.append(c);
}
return reversedString.toString();
}
```
If you _really_ wanted to re-invent the wheel, I think `Character.isLowSurrogate(c)` could be replaced with `c >= '\uDC00' && c <= '\uDFFF'`, though I have not personally tested this.
And while we're on the topic of Unicode, you should of course read [The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)](https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/), if you haven't already.