Program to print the reverse of any entered string.public

class reverse
{

private int x,i,l;

public reverse()
{

x = 0;
}

public void array1(String a)
{
l=a.length();
System.out.print("the reverse string is ");
for(i=l-1;i>=0;i--)
System.out.print(a.charAt(i));
}
}