Write a program to reverse a string.
import java.io.*;
import java.util.*;
public class Main {
public static void main (String[] args) {
String str= "mukesh", revstr="";
char ch;
for (int i=0; i<str.length(); i++)
{
ch= str.charAt(i);
revstr= ch+revstr;
}
System.out.println(revstr);
}
}