Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
public String reverseString(String s) {
return new StringBuilder(s).reverse().toString();
}
一行代码解决方案