Virtusa interview question

write a Java code in order to reverse a word