Reverse a string in java

public class MyClass
{
public static void main(String args[])
{
String value = "Pandiyan";
char[] valueinchar = value.toCharArray();
char[] newvalueinchar = new char[valueinchar.length];
int j = 0;
for(int i=valueinchar.length-1;i>=0;i--)
{
newvalueinchar[j]= valueinchar[i];
j++;
}
String val = String.valueOf(newvalueinchar);
System.out.println(val);
}
}