Back
You can try:
new StringBuilder(hi).reverse().toString()
Or, toward versions earlier than JDK 1.5, try java.util.StringBuffer rather than StringBuilder — both possess the same API. StringBuilder is favored nowadays as there's no concurrency matter.
30.9k questions
32.9k answers
500 comments
665 users