← Unit 2 · all exercises
Saved in this browser only

Reverse a word

Return the word with its letters in reverse order.

String reverse(String word)

Solution.java
Loading editor…
Results

Examples

  • reverse(java) → avaj
  • reverse(abc) → cba

There are also 4 hidden tests you can't see. Solve the problem, not the examples.