TailorSoft Interview Question

Invert a string in groovy or Java