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.
31k questions
32.4k answers
500 comments
693 users