Write a program to print Reverse String

# Write a program to print  reverse String 


Public station void main(String args[])

{

String s="patil";

String rev="";

For(int i=s length-1;i>=0;i++)

{

rev=rev+s.charAt(i);

}

System.out.println(rev);

}


Output: litap

Comments

Popular posts from this blog

Write a program to print all link present on google page || selenium code