Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
public class Solution {
public String reverseString(String s) {
if(s==null || s=="")
return null;
StringBuilder sb = new StringBuilder();
for(int i=0;i<s.length();i++){
sb.insert(0,s.charAt(i));
}
return sb.toString();
}
}